Another alternative way around the problem would be...
foreach x in `="${out_`year'}"' {
...
Personally I still prefer the -foreach x of global g-, which also runs quicker than -foreach x in $g-.
David
-----Original Message-----
From: Michael Blasnik [mailto:[email protected]]
Sent: 11 April 2005 12:47
To: [email protected]
Subject: Re: st: foreach and globals and {.}
woops, I forgot about that requirement. You can also put the global into a
local before using it (which may be helpful in other situations):
local outyear ${out_`year'}
foreach x in `outyear' {
...
Michael Blasnik
*
* 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/