Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Unable to create local macro in modified ado-file (xtreg_fe.ado)
From
Richard Williams <[email protected]>
To
[email protected], [email protected]
Subject
Re: st: Unable to create local macro in modified ado-file (xtreg_fe.ado)
Date
Mon, 16 Jan 2012 23:39:49 -0500
At 07:36 PM 1/16/2012, Bert Lloyd wrote:
Hello all,
Thank you very much for the discussion.
Regarding Nick Cox's valuable suggested partial test (macrotest), that
and other similar tests work fine in ado-files that I create myself
from scratch, as well as others borrowed from co-workers, etc. This
problem has only occurred when attempting to modify Stata ado-files.
One other tidbit: Your original code works when version is set to 7
but not 6. Further, this code works:
version 6
local mylocal Hello
noisily di "*****************"
noisily di "local my_test_local contains"
noisily di "`mylocal'"
noisily di "*****************"
Why? The whatsnew file for Stata 7 says "Stata now allows names to be
up to 32 characters long. That includes variable names, label names,
macro names, and any other name you can think of." I don't know what
the limit was in V 6 -- 7 characters maybe? -- but my_test_local was
probably too long of a name. Make your macro names shorter, like I
did above, and I think your code will work.
-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME: (574)289-5227
EMAIL: [email protected]
WWW: http://www.nd.edu/~rwilliam
*
* 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/