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: References for `= foo'


From   Sergiy Radyakin <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: References for `= foo'
Date   Mon, 29 Jul 2013 18:05:32 -0400

Steve, basically you put an equal sign to force evaluation to kick in:

compare:
di "`char(90)'"
di "`=char(90)'"
sysuse auto
di "`price[1]'"
di "`=price[1]'"
local 5 a
di "`3+2'"
di "`=3+2'"
di "``=3+2''"

If there is a function or a reference to a variable in the dataset
that you want to get evaluated, you place '=' in front. Be careful
with strings as string expressions  are subject to a rather low chars
limit (not sure about Stata 13).

Best,Sergiy



On Mon, Jul 29, 2013 at 5:49 PM, Steve Samuels <[email protected]> wrote:
>
> I have frequently seen (and copied) macros of the type:
>
> `= foo'
>
> One such, in a post by Joseph Coveny on June 19:
>
> set seed `=date("2013-06-20", "YMD")'
>
>
> Can anybody point out references to such " `= foo " usage in the
> Documentation or elsewhere? ( Yes, I've looked, but Adobe Reader's
> search apparently has trouble with "`").
>
> Thanks,
>
>
> Steve
> [email protected]
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index