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: RE: command's options as macro


From   tashi lama <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: command's options as macro
Date   Thu, 26 Jul 2012 19:37:21 +0000

so the value of macro acutally is different than what is being displayed. when I say 

di "`note1'"   I get 
note(" 1 2011" )

isn't note("1 2011") xerox copy of "`note`'"? 

i tried without quotation marks still no luck. 



----------------------------------------
> From: [email protected]
> To: [email protected]
> Subject: st: RE: command's options as macro
> Date: Thu, 26 Jul 2012 12:17:26 -0700
>
> Try without the quotation marks around `note1'
> If you expand out the macro it's actually tsline hits, "note("1 2011")"
> The quotation marks around the options isn't valid Stata syntax.
>
> Hope that helps.
>
> -Sarah
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of tashi lama
> Sent: Thursday, July 26, 2012 11:58 AM
> To: [email protected]
> Subject: st: command's options as macro
>
>
> Hello all,
> Could someone attempt to explain this to me? I just can't get over
> this hump.
>
> local m1= title[1]
> local note1 "note" "(" `"" 1 `m1'" "' ")"
> local note2 1 `m1'
> di "`note1'"
> note(" 1 2011" )
>
> di "`note2'"
> 1 2011
>
> tsline hits, "`note1'"
> invalid syntax although if you write it out, it would be tsline hits,
> note("1 2011") which looks fine tsline hits, note("`note2'") stata is happy
>
> Thanx..
> *
> * 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/ 		 	   		  
*
*   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