Statalist


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

Re: st: What is the best way to handle embedded spaces


From   "Dan Weitzenfeld" <[email protected]>
To   [email protected]
Subject   Re: st: What is the best way to handle embedded spaces
Date   Tue, 6 Jan 2009 11:31:58 -0800

Try

local PrivIssuer `""Finance vehicle-Priv sectorbank/finance" "Finance
vehicle-Priv sector indust/util""'

On Tue, Jan 6, 2009 at 11:04 AM, Sutton, Bennett W. <[email protected]> wrote:
>
> 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)
>
>
> Thanks,
>
> Ben Sutton
> International Monetary Fund
>
> *
> *   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/



--
Dan Weitzenfeld
Media Analyst
EmSense Corporation
512 2nd Street, 3rd Floor
San Francisco, CA 94107
w: 415.418.7314
m: 510.552.0106
[email protected]
*
*   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