Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Dropping Program Saved as an ado-file


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Dropping Program Saved as an ado-file
Date   Wed, 5 Sep 2012 13:56:34 +0100

An alternative is to pass the names of temporary variables via an
option. If you have

tempvar foobar
gen `foobar' = ...

you can call a subprogram with

... foobar(`foobar')

This requires care, but so does sharing names via a global. For
example, that global will stick around with inbuilt potential to mess
up other things if you are not careful.

Nick

On Wed, Sep 5, 2012 at 10:26 AM, Maarten Buis <[email protected]> wrote:
> On Wed, Sep 5, 2012 at 11:20 AM, Maarten Buis wrote:
>>         di as txt "Dispay summary of " as result "yvar"
>>         sum $yvar
>>
>>         di _n as txt "Dislay summary of " as result "xvars"
>>         sum $xvars
>
> hmm... this is obviously not a good example if one wants to learn how
> to spell "Display".
>
> However, I guess (and hope) people interested in such issue won't go
> to the Statalist.
>
>
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index