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]

st: RE: How do I use a local within a global?


From   philippe van kerm <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: How do I use a local within a global?
Date   Thu, 5 May 2011 11:15:30 +0000

di ${a_`z'}


NB: check section "18.3.4 Macros and expressions" of the users guide about using
	global a_b "Thank you Stata Users" 
	and
	local z "b"
instead of
	global a_b = "Thank you Stata Users" 
	and
	local z = "b"


Philippe


> -----Message d'origine-----
> De : [email protected] [mailto:owner-
> [email protected]] De la part de Christian Lehmann
> Envoyé : Thursday, May 05, 2011 12:44 PM
> À : [email protected]
> Objet : st: How do I use a local within a global?
> 
> Dear Stata Users,
> 
> How do I use a local within a global?
> 
> Take the following example. I want to use the local z to call the
> global a_b
> 
> global a_b="Thank you Stata Users"
> local z="b"
> di "$a_`z'"
> 
> Stata would display "b" instead of the desired result  "Thank you Stata
> Users".
> 
> Thank you!
> 
> Chris
> *
> *   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/

Attention, nouvelle adresse a partir du 15 avril 2011 :
CEPS/INSTEAD
3, avenue de la Fonte
L-4364 Esch-sur-Alzette

*
*   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