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: [email protected]
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Michael Blasnik
Sent: Sunday, March 30, 2008 10:38 AM
To: [email protected]
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/