[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Can a global macroname act as a prefix?
Local variables can act as prefixes and suffixes in variable names:
local a = "local"
gen `a'_x = 1 // create local_x
gen x_`a'= 1 // creates x_local
global b= "global"
gen x_$b= 1 // creates x_global
gen $b`a'= 1 // creates globallocal
My question: Can I create something a variable named "global_x"
using the global variable $b ?
Thanks
Steve
*
* 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/