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: AW: the convenient way to exclude part of the do file from running


From   Rodolphe Desbordes <rodolphe.desbordes@strath.ac.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: AW: the convenient way to exclude part of the do file from running
Date   Tue, 20 Apr 2010 16:21:50 +0100

A much less elegant way would be to use -exit-.

Rodolphe

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Martin Weiss
Sent: mardi 20 avril 2010 16:14
To: statalist@hsphsun2.harvard.edu
Subject: st: AW: the convenient way to exclude part of the do file from running


<>
" Therefore, I would like to find if there is any better way to exclude some part of the commands from running."



For huge do-files, highlighting the relevant lines is not an option, but you can have a main do-file, and call sub-do-files from there. This has the side effect that it forces you to think about logical chunks of your problem that could be allocated into one of those sub-do-files...



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Amanda Fu
Gesendet: Dienstag, 20. April 2010 17:07
An: statalist@hsphsun2.harvard.edu
Betreff: st: the convenient way to exclude part of the do file from running

Hi all,

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.

Thanks for your help!

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