Bookmark and Share

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]

AW: st: AW: Doubt on the exexcution of a do file?


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   AW: st: AW: Doubt on the exexcution of a do file?
Date   Fri, 21 May 2010 12:37:26 +0200

<> 

" BTW, if I open the do file I wrote  in the Stata-do-file editor and click 
the do button, it goes well no matter there is a carriage return or not."


Hmmm, if I enter your do-file and hit "Run", the do-file editor seems to add
a blank line automatically for me. Is this a feature? I certainly cannot
find it in my [GSW] manual, but if it is a feature, it is a very useful
one...



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Grace Jessie
Gesendet: Freitag, 21. Mai 2010 12:22
An: [email protected]
Betreff: RE: st: AW: Doubt on the exexcution of a do file?

Martin,
thank you for your help.
Adding a carriage return at the end of the last line works well.
BTW, if I open the do file I wrote  in the Stata-do-file editor and click 
the do button, it goes well no matter there is a carriage return or not.
Any difference?
 
Regards,
Grace 

----------------------------------------
> From: [email protected]
> To: [email protected]
> Subject: st: AW: Doubt on the exexcution of a do file?
> Date: Fri, 21 May 2010 12:05:52 +0200
>
>
> <>
>
>
>
> Stata needs to see a carriage return at the end of the -keep make- line,
> otherwise it will refuse to execute the line. So insert a blank line after
> it, or put the command -exit- on the next line, as recommended by J. Scott
> Long, in his book http://www.stata-press.com/books/wdaus.html on page 65.
> The latter strategy allows you to put an unlimited amount of comments on
the
> lines following -exit-.
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Grace Jessie
> Gesendet: Freitag, 21. Mai 2010 11:34
> An: [email protected]
> Betreff: st: Doubt on the exexcution of a do file?
>
>
> Statalists,
>
> I wrote a do file and saved it as a do file named "dratf.do".Accidently, I
> found if there was no space after the last typing in the do file and I run
> the do file in the command window, the last typing in the do file will not
> be excecuted.
> For example,
>
> The contents of draft.do is,
> sysuse auto, clear
> keep make //note: there is no excess space after "make".
>
> I typed the following in the command window of Stata,
> do draft.do
>
> Unfortunely, the "keep make" was not exexctued.
>
> What is wrong?
>
> Hope for help.
>
> Regards,
> Grace
> *
> * 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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index