Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

AW: st: RE: RE: RE: Undocumented limitation of describe (and hence -ds-) in Stata 10?


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   AW: st: RE: RE: RE: Undocumented limitation of describe (and hence -ds-) in Stata 10?
Date   Wed, 7 Apr 2010 12:54:14 +0200

<> 



The one that I gave in
http://www.stata.com/statalist/archive/2010-04/msg00269.html last night, for
instance:

***
sysuse auto, clear
su mpg
di r(mean)
di `r(mean)'
di "`r(mean)'"
***


HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Nick Cox
Gesendet: Mittwoch, 7. April 2010 12:05
An: statalist@hsphsun2.harvard.edu
Betreff: RE: st: RE: RE: RE: Undocumented limitation of describe (and hence
-ds-) in Stata 10?

What examples do you have in mind? 

Nick 
n.j.cox@durham.ac.uk 

Martin Weiss

The confusion is compounded by -display-'s uncanny ability to somehow
circumvent the requirement for single quotes: As it takes an
-expression-,
it knows beforehand it needs to evaluate. Many users take its behavior
as
representative of the rest of Stata, I think...

Nick Cox

I think of ` ' as meaning "evaluate this here and now". Here should be
obvious, but the now is important too, meaning precisely "before you try
to execute this command line". 

`macname' is the canonical example for local macro macname. But

`= 2 + 2' 

`c(date)'

`r(varlist)' 

`e(cmdline)' 

`: value label foreign' 

are other examples in which you also want literal text substituted. I
don't know if this is ever official wording -- indeed I doubt it -- but
I think of examples other than the first as invoking the local macro
persona of beasts that are not local macros in the most restricted sense
but can behave similarly given persuasive syntax. 

Nick 
n.j.cox@durham.ac.uk 

Michael I. Lichter

I understand that single quotes are not simply local macro dereference 
operators, but it certainly looks like that's their function in the 
command line. Other than local macro, what can you dereference in this
way?


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index