Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: pass quotes in a local macro


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: Re: pass quotes in a local macro
Date   Sat, 27 Jun 2009 01:32:36 +0200

I do not know why you want to -display- it instead of using it for your -graph- thing. But omit the quotes aorund the -display- directive and there will be no error. You also should not change the line continuation I use...

HTH
Martin
_______________
----- Original Message ----- From: "moleps islon" <[email protected]>
To: <[email protected]>
Sent: Saturday, June 27, 2009 1:27 AM
Subject: st: pass quotes in a local macro


I get an error msg running your code-seems to be missing a double
quote in the beginning of the string-and I still dont get how to pass
the double quotes.

. sysuse auto, clear
(1978 Automobile Data)

. levelsof for, local(levs)
0 1

. foreach level of local levs{
 2. loc xt `xt' `level' /* */  "`:label(foreign) `level''"
 3. }

. di "`xt'"
0 Domestic" 1 "Foreign"" invalid name
r(198);

end of do-file


Regards,
M
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index