Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: 2 queries re code in -sureg-

From   "Nick Cox" <>
To   <>
Subject   st: RE: 2 queries re code in -sureg-
Date   Tue, 8 Oct 2002 15:23:17 +0100

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.


---------------------------- parent.ado
program def parent
	version 7
	di "`Stephen'"

program def Child
	version 7
	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:

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