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

RE: st: RE: Macro questions. (Again).

From   [email protected]
To   [email protected]
Subject   RE: st: RE: Macro questions. (Again).
Date   Wed, 11 Aug 2004 12:09:00 -0400

Thanks to Nick, Ulrich and David
for these helpful comments.
Best regards.

                      "Nick Cox"                                                                                                           
                      <[email protected]>           To:       <[email protected]>                                          
                      Sent by:                         cc:                                                                                 
                      owner-statalist@hsphsun2.        Subject:  RE: st: RE: Macro questions. (Again).                                     
                      08/11/2004 10:58 AM                                                                                                  
                      Please respond to                                                                                                    

In addition to the facilities recommended by
Ulrich and David, there is a very dusty
set of utilities called -listutil- on SSC.
These all predate -foreach-, -forval- and -macrolists-,
which remove most of the need for them, but
some of the commands, and/or some of the code,
might be useful.

[email protected]

> [email protected] wrote:
> > Nick,
> > When I talk about working inside macros, I am thinking of something
> > like this:
> > I know that one can increment a macro by doing: local
> myvars "`myvars'
> > var1" But why can't we REMOVE var1 from the macro myvars?
> > Something like (it's just an example, but maybe you have
> another syntax):
> >
> > local myvars "`myvars' , -var1"
> >
> > (where -var1 is intented to tell Stata to remove var1 from myvars).
> >
> > This could sound odd but sometimes, macros contain a lot of
> variables and
> > it is painfull to create other macros that are just part of
> them (what I
> > call "submacors").

*   For searches and help try:

*   For searches and help try:

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