Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Zhengfeng Guo <gzfsadie@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: unexpected end of file |
Date | Mon, 16 Aug 2010 23:32:44 -0400 |
your code, saved this as mean2.ado. I checked: sysuse auto, clear mean2 price mpg It worked well and I did not get any error message. Sadie On 8/16/2010 11:02 PM, Dani Tilley wrote:
I removed all comments for the time being so that's not an issue. I really don't know what's wrong. Why would I get the same error for this program as well: program define mean2 version 10.1 syntax varlist(min=1 max=2) foreach var in `varlist' { su `var',mean di as text "Mean for `var': " as res r(mean) } end . sysuse auto, clear . mean2 price mpg Mean for price: 6165.2568 Mean for mpg: 21.297297 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); DF Tilley ----- Original Message ---- From: Martin Weiss<martin.weiss1@gmx.de> To: statalist@hsphsun2.harvard.edu Sent: Fri, August 13, 2010 8:33:16 AM Subject: RE: st: unexpected end of file <> A search for the term "unexpected end of file" would have yielded many hits in the Statalist archive. Among them: http://www.stata.com/statalist/archive/2010-07/msg00321.html HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Ronan Conroy Sent: Freitag, 13. August 2010 14:26 To: statalist@hsphsun2.harvard.edu Subject: Re: st: unexpected end of file On 12 Lún 2010, at 18:21, Dani Tilley wrote:I've wrote a Stata command and saved it as a .ado and copied on my ado directory. When I start Stata and run the command, I get the following error: unexpected end of file (error occurred while loading command.ado)Check too for a unbalanced literal quotes or comments. Ronan Conroy ================================= rconroy@rcsi.ie Royal College of Surgeons in Ireland Epidemiology Department, Beaux Lane House, Dublin 2, Ireland +353 (0)1 402 2431 +353 (0)87 799 97 95 +353 (0)1 402 2764 (Fax - remember them?) http://rcsi.academia.edu/RonanConroy P Before printing, think about the environment * * 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/ * * 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/ * * 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/
* * 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/