[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: Maximum length of macros
The limit that is biting here is not the maximum
length of macros, but the maximum length of
a string expression. See help on -limits-.
Your use of the equals sign = may seem innocuous but it causes
Stata to evaluate what lies to the right of it. In cases like this,
just copy the list without evaluating it. Your macro is
being truncated after 80 characters, it seems. (12 is the number
. local w "pop young old male MSA countyhospice pctblack pctrural
pctold charscore ipdays opdays tot_hos oppaid totalpaid"
See also [U] 21.3.4 (p.196 in version 8 edition).
F. Michael Kunz
> How many characters can a local or a global store? I need to store a
> variable list in a macro and it is being truncated after the 12
> character. Changing from local to global is not of any help
> nor is using
> double quotes (have tried). Can anyone give me some advice on how to
> handle this problem?
> . local w = "pop young old male MSA countyhospice pctblack pctrural
> pctold charscore ipdays opdays tot_hos oppaid totalpaid"
> . local z: word count `w'
> . display `z'
> . display "`w'"
> pop young old male MSA countyhospice pctblack pctrural pctold
> ipdays op
* For searches and help try: