Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Can a global macroname act as a prefix?


From   Steven Samuels <ssamuels@albany.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: Can a global macroname act as a prefix?
Date   Tue, 8 May 2007 10:14:59 -0400

Thank you, Michael. ${b}_x does work. I'd been confused by the examples on p. 182 of the programming manual (V9), because they put (macro) suffixes inside the brackets.

Steve

On May 8, 2007, at 8:28 AM, Michael Blasnik wrote:


You need to put braces {} around global names so Stata can tell where they end -- local don't have this problem because they include `' to enclose the full name.

----- Original Message ----- From: "Steven Samuels" <ssamuels@albany.edu>

global b= "global"
My question: Can I create a variable named "global_x" using the global variable $b ?
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index