Bookmark and Share

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: macro compound double quotes


From   Abhimanyu Arora <[email protected]>
To   [email protected]
Subject   Re: st: macro compound double quotes
Date   Tue, 10 Apr 2012 19:12:18 +0200

As a follow up I managed to find the right answer (by hit and trial)

local temp1:list clean inclcities
local countcity:word count `temp1'
di `countcity'

So it seems that unless the elements of a macro are minimally adorned,
stata doesn't parse the spaces between the tokens (even if they are
distinguished by compound double quotes)

Cheers
Abhimanyu


On Tue, Apr 10, 2012 at 6:51 PM, Abhimanyu Arora
<[email protected]> wrote:
> Dear statalist
> I have been trying to understand this phenomenon
>
> http://screencast.com/t/m6fGA8g9lxfX
>
> From what I have read in the manuals, the compound double quotes help
> stata distinguish the tokens better when the macros themselves contain
> quotes. So isn't the first syntax more appropriate?
> But even then, the number returned when the second syntax is used
> doesn't seem to be correct.
>
> Many thanks and best regards
> Abhimanyu
> *
> *   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index