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

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


From   adiallo5@worldbank.org
To   statalist@hsphsun2.harvard.edu
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.
Amadou.



                                                                                                                                           
                      "Nick Cox"                                                                                                           
                      <n.j.cox@durham.ac.uk>           To:       <statalist@hsphsun2.harvard.edu>                                          
                      Sent by:                         cc:                                                                                 
                      owner-statalist@hsphsun2.        Subject:  RE: st: RE: Macro questions. (Again).                                     
                      harvard.edu                                                                                                          
                                                                                                                                           
                                                                                                                                           
                      08/11/2004 10:58 AM                                                                                                  
                      Please respond to                                                                                                    
                      statalist                                                                                                            
                                                                                                                                           
                                                                                                                                           
                                                                                                                                           
                                                                                                                                           




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.

Nick
n.j.cox@durham.ac.uk

> adiallo5@worldbank.org 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:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/




*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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