Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Stepping through do file


From   "Buzz Burhans" <buzzb3@verizon.net>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Stepping through do file
Date   Mon, 31 Mar 2008 09:40:00 -0400

Michael,

Thanks for the directions for adding the line number -it really is helpful.
Because I now see the line numbers where I am paused I can quickly move
through long sections of the file being checked to where it gets to a
section where I have particular interest.  Thanks again for this utility and
your help.

Buzz 

Buzz Burhans, Ph.D.

Dairy-Tech Group

Twin Falls, ID
Phone: 208-320-0829
Fax: 208-735-1289 

So. Albany VT
Phone: 802-755-6842

Email: buzzb3@verizon.net

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Michael Blasnik
Sent: Sunday, March 30, 2008 10:38 AM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Stepping through do file

...
Glad to hear that it works.

To add a line number to the pause message you can change just one line:

file write `new' "pause" _n

should become

file write `new' "pause `lnum'" _n


The _n in these commands is not the _n observation index, but is actually
stands 
for _newline, placing a line end character in the output.

With regard to adding a replace option, addpause automatically replaces the 
pause version of the do file -- I assumed that the pause version of any do
file 
is not worth protecting from accidental overwriting since the original do
file 
should still exist.  If you wanted to make it optional, rather than assumed,
it 
would be easy to add REPlace as an option to the syntax statement and then 
substitute -`replace'- for -replace- in the file open command.

Michael



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index