Statalist


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

Re: st: Macro from scalar


From   "Eva Poen" <eva.poen@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Macro from scalar
Date   Fri, 22 Aug 2008 19:15:40 +0100

Douglas,

like this?

scalar s = 1
local l s

di s
di `l'

To avoid confusion with variable names, you can write

local l scalar(s)

Hope this helps,
Eva


2008/8/22 Levy, Douglas E., Ph.D. <DLEVY3@partners.org>:
> Hi all,
> Is there a way to take a scalar and place its value in a macro?
> Thanks,
> Doug
>
> Douglas Levy, PhD
> Institute for Health Policy
> Massachusetts General Hospital
> 50 Staniford Street; Suite 901
> Boston, MA 02114
> Tel 617.643.3595
> Fax 617.724.4738
>
*
*   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   |   What's new   |   Site index