Run this in a do-file:
**********
sysuse auto, clear
loc lastloc=trunk[_N]
gl lastgl=trunk[_N]
sca lastsca=trunk[_N]
**********
Then:
************
macro dir
sca dir
************
and see who made it out of the do-file and who did not :-)
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Tuesday, September 23, 2008 11:39 AM
To: [email protected]
Subject: st: RE: local macro trouble
Maybe the -local- dies with the do-file? Have you tried a -global-?
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Ashim Kapoor
Sent: Tuesday, September 23, 2008 11:33 AM
To: [email protected]
Subject: st: local macro trouble
Hi everyone,
Maybe I am getting tired so I am not able to see this. Maybe some one
else can see it.
I do this : -- >
egen twodayfallindex=sum(twoindex)
local dispdate = twodayfallindex[_N]
in a do file.
and after I run the do file if I say -macro dir- it does not show up
in the macros!!
How can that be ?
I don't know why I am unable to initialize this macro : ( !
Thank you,
Ashim.
*
* 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/
*
* 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/