|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: RE: What is the best way to handle embedded spaces
From |
"Sutton, Bennett W." <[email protected]> |
To |
<[email protected]> |
Subject |
st: RE: RE: What is the best way to handle embedded spaces |
Date |
Tue, 6 Jan 2009 14:44:34 -0500 |
This works as long as I don't insert line returns ( /* */ ) but I can
live with that.
Thank you very much!
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nick Cox
Sent: Tuesday, January 06, 2009 2:34 PM
To: [email protected]
Subject: st: RE: What is the best way to handle embedded spaces
A similar problem came up only yesterday. You need to use compound
double quotes in defining your macro.
Nick
[email protected]
Sutton, Bennett W.
Seems that stata 10 is having a problem reading the first element of my
local with embedded spaces:
. local PrivIssuer "Finance vehicle-Priv sector
bank/finance" "Finance vehicle-Priv sector indust/util" /*
> */ "Private Other" "Private sector bank"
"Private sector finance" "Private sector industrial" /*
> */ "Private sector utility"
. foreach type of local PrivIssuer {
2. display "`type'"
3. replace issuertype2 = 1 if issuertype ==
`"`type'"'
4. }
Finance
(0 real changes made)
vehicle-Priv
(0 real changes made)
sector
(0 real changes made)
bank/finance
(0 real changes made)
Finance vehicle-Priv sector indust/util
(102 real changes made)
Private Other
(3 real changes made)
Private sector bank
(1178 real changes made)
Private sector finance
(307 real changes made)
Private sector industrial
(723 real changes made)
Private sector utility
(197 real changes made)
*
* 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/