Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: macro multiplication


From   Daniel Egan <degan.stata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: macro multiplication
Date   Mon, 28 Nov 2005 22:59:58 +0000

hello all,

I am baffled by something I just encountered. Then again, i haven't
been using Stata for 2 months, so its possible I am just still
thinking in another language.

I am writing what amounts to a simulation in stata, mostly using only
globals and macros. When I try to multiply two macros, I get a
"invalid name" error.

The relevant code is:

global mua=-1
local na=1
local mpa=`mua' *`na'

Sorry if this is obvious. I did search help/archives.


TIA.

Dan

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