Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: the convenient way to exclude part of the do file from running


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: the convenient way to exclude part of the do file from running
Date   Tue, 20 Apr 2010 16:16:46 +0100

The answer surely hinges on your idea of "convenience". 

I can't see why you regard deleting a comment as so obnoxious. It's a
very good method. What's more, I wouldn't delete 100 lines of code in a
hurry. 

But another way to do it: -exit- forces an exit. You'd have to delete
that too, or comment it out, if you changed your mind. 

Nick 
n.j.cox@durham.ac.uk 

Amanda Fu

I was wondering if there is any more convenient way to exclude some
part of the do file from running in the process of writing and
revising a do file.

For example, I am working on a do file with 1000 lines of commands, in
which  I would like to exclude  the bottom 100 lines from running  and
checking.  I have not decided if I should permanently delete the 100
lines from this do file or not.

Currently what I deal with this is just using mouse to select the
parts that I want to check and run. When I have to run a couple of
times, this using-mouse-to-select becomes tedious. Another way is to
add * or /* before those excluded lines. I do not like this way since
when finally I want to include these commands, I have to delete those
symbols. Therefore, I would like to find if there is any better way to
exclude some part of the commands from running.


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index