There are many situations where it would be helpful to know the name of current -do- file; for instance, for version
control. At the top of every do-file I usually put
where $now is a global containing a time stamp. This lets me identify the exact copy of a -do-file that created the
output with the same time-stamp. However, it would be easier if I didn't have to remember to change the name of the file
in this line whenever I changed the name of the do-file.
I have tried to implement this functionality - of keeping the name of the current do-file in a global - with a set of
wrappers and globals, but one always runs into the problems when nesting do files - if one file calls another, it has to
store the current value, update it, then return it back to the original value when it returns control to the calling
do-file. Since there is no limit to the levels of nesting, this gets messy.
cheers,
Jeph
On 4/30/2013 7:36 PM, Nick Cox wrote:
Why would this make a .do file easier to use and maintain?
Nick
njcoxstata@gmail.com
On 30 April 2013 23:38, daniel klein <klein.daniel.81@gmail.com> wrote: