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

RE: st: Stepping through do file

From   "Buzz Burhans" <>
To   <>
Subject   RE: st: Stepping through do file
Date   Mon, 31 Mar 2008 09:40:00 -0400


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 Burhans, Ph.D.

Dairy-Tech Group

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

So. Albany VT
Phone: 802-755-6842


-----Original Message-----
[] On Behalf Of Michael Blasnik
Sent: Sunday, March 30, 2008 10:38 AM
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
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
is not worth protecting from accidental overwriting since the original do
should still exist.  If you wanted to make it optional, rather than assumed,
would be easy to add REPlace as an option to the syntax statement and then 
substitute -`replace'- for -replace- in the file open command.


*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index