Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: unexpected end of file
From
[email protected] (William Gould, StataCorp LP)
To
[email protected]
Subject
Re: st: unexpected end of file
Date
Tue, 17 Aug 2010 08:58:35 -0500
Dani Tilley <[email protected]> wrote an ado-file called mean2.ado
and it evidently works,
> . sysuse auto, clear
> . mean2 price mpg
> Mean for price: 6165.2568
> Mean for mpg: 21.297297
Yet, Dani reports,
> when I save the program as mean2.ado, copy it to ado/updates, and say
> -mean2 price mpg- Stata returns:
>
> unexpected end of file
> (error occurred while loading mean2.ado)
> r(612);
To debug this problem, I recommend Dani do the following.
1. Verify Dani still has the problem. Type
. program drop _all
. sysuse auto, clear
. mean2 price mpg
2. Find out where mean2.ado is. Type
. which mean2
<output omitted>
Stata will display full path and filename.
Q1. Is this the path and filename Dani expected?
3. Look at the file. Type
. type <insert full path and filename here>
<output omitted>
Q2. Are these the contents Dani expected?
4. Watch the error occur. Type
. program drop _all
. do <insert full path and filename here>
The ado-file will be treated as a do-file and Dani will be able
to watch it load. The location of the r(612) will be pinpointed.
5. Clean up after running step 4. Type
. program drop _all
6. Fix problem. If the answer is not obvious, Dani should
include the output steps 2, 3, and 4 in any further questions.
-- Bill
[email protected]
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/