Statalist


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

st: pass quotes in a local macro


From   moleps islon <[email protected]>
To   [email protected]
Subject   st: pass quotes in a local macro
Date   Sat, 27 Jun 2009 01:27:22 +0200

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/



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