<>
" Local macros exist solely within the program or do-file in
which they are defined." As devertised a couple of times in recent history
of the list. See [P], p. 193.
In any event, the assignment - local aa = TTT- would not do any good for
you. If it was supposed to work, it would have to be - local aa = `TTT'- so
that the content of TTT, not the string "TTT" get stored...
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Paulo Regis
Sent: Samstag, 8. August 2009 14:09
To: [email protected]
Subject: st: locals and programs
Hi all,
I have which should be a simple question but still I do not manage to
solve it. I simplified the problem as much as possible. If you run the
following code and use the command -TT, you get an error message.
capture program drop aaa
program define aaa
local aa = TTT
display `aa'
end
capture program drop TT
program define TT
local TTT = 5
aaa
end
How can I use the local "TTT" in the programme "aaa". Solving this
issue may save me much time since the code is quite long
Cheers
Paulo
*
* 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/