[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: 2 queries re code in -sureg-
Stephen P. Jenkins
> I am going through the code for -sureg- in detail (hoping
> to adapt some
> of it for my own uses!). (Similar code appears in related commands.)
> I have two queries:
> (1) Why is there no -markout- line to accompany the -markout- one?
> [Is it because this is handled via -reg3-, which
> -sureg- calls?]
> (2) What is the undocumented "c_local" command used in the
> short IsStop
> auxiliary programme used at the end? Can "local" be used
> instead? [The IsStop program in -reg3- is very similar, but
> uses local rather than c_local.] -findit c_local- is empty.
-c_local- inserts a local macro in the calling
program's macro space.
program def parent
program def Child
c_local Stephen "Jenkins"
After calling -Child- from -parent-, the local
macro Stephen is defined.
This appears to be undocumented because
Stata Corp's programmers wanted it
for their own use -- and on occasion it
is mightily useful for communicating
between different programs without
leaving ugly globals all over the place --
but considered it too arcane or too
dangerous for general use.
* For searches and help try: