Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: use of brace inside of macro - still a question


From   "Dr. Bill Westman" <bigweb_ddt@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: use of brace inside of macro - still a question
Date   Wed, 16 Jun 2010 11:51:11 -0700 (PDT)

Austin your solution is a good work around. thanks.  

Bill
--- On Wed, 6/16/10, Austin Nichols <austinnichols@gmail.com> wrote:

> From: Austin Nichols <austinnichols@gmail.com>
> Subject: Re: st: use of brace inside of macro - still a question
> To: statalist@hsphsun2.harvard.edu
> Date: Wednesday, June 16, 2010, 12:46 PM
> B Web <webicky@gmail.com>
> :
> You can't do that.  Why do you want to?  Maybe
> try...
> 
> macro drop _all
> global test "continue, break"
> forv i=1/2{
>  di in r "${test}"
>  ${test}
> }
> 
> On Wed, Jun 16, 2010 at 1:31 PM, B Web <webicky@gmail.com>
> wrote:
> > not exactly what I was looking for and I apologize for not being specific.
> >
> > I want to end a loop defined by a "brace" stored in a
> global macro.
> >
> > macro drop _all
> > global test  }
> >
> > forv i=1/2{
> >  di in r "${test}"
> >  $[test}
> > * --- error ---
> > What I am trying to do is "end" the loop using the
> global macro of a
> > brace.   Can you get that working?  If so, please
> explain.  If not -
> > can someone else please elaborate.
> >
> > Bill
> 
> *
> *   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/
> 


      

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index