Hi,
I have a problem with macros.
I’m using global macro in some local ones and what I want to obtain don’t work…if someone has an idea.
Example without global macro (which works) :
local Var1vs1 "(g1vs1 : -("
local one "x + y))"
local Var1vs1 "`Var1vs1' `one'"
di "Var1vs1 is `Var1vs1' " /*it works, I have : Var1vs1 is (g1vs1 : -( x + y)) */
Example with global macro (doesn’t work) :
global N = 1 /*here is my global*/
local Var$Nvs$N "(g${N}vs${N} : -("
local one "x + y))"
local Var${N}vs${N} "`Var${N}vs${N}' `one'"
di "Var${N}vs${N} is `Var${N}vs${N}' " /*Problem I have:Var1vs1 is x + y)) */
I try to use this sort of program in order to use the nlcom command with a lot of elements…
Thank you very much.
valérie
-------------------------------
Valérie OROZCO
Toulouse School of Economics (INRA-GREMAQ)
21, allée de Brienne
F-31000 Toulouse, France
MF 426
+33 5 61 12 85 91
-------------------------------
*
* 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/