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

Re: st: Maximum length of macros


From   Dan Blanchette <dan_blanchette@unc.edu>
To   statalist-digest@hsphsun2.harvard.edu
Subject   Re: st: Maximum length of macros
Date   Fri, 11 Jun 2004 11:56:40 -0400 (EDT)

. whelp limits

will show you that
                                        Small    Intercooled       Stata/SE
------------------------------------------------------------------------------------------
# of characters in a macro             8,681         67,784      1,081,511

But in order to keep the max length of a string from limiting you, you need to
drop the equals sign.

Try:
. local w   "pop young old male MSA countyhospice pctblack pctrural pctold charscore ipdays opdays tot_hos oppaid totalpaid"

Dan Blanchette
Carolina Population Center UNC-CH



>
> 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?
>
> Thanks!
>
> Code:
>
> . 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'
> 12
> . display "`w'"
> pop young old male MSA countyhospice pctblack pctrural pctold charscore ipdays op
>
>
> --
> =========================================================
> F. Michael Kunz, M.A.
> Senior Research Associate
> Center for Health Economic and Policy Studies
>
> Medical University of South Carolina
> Department of Health Administration and Policy
> 19 Hagood Avenue, 408 Harborview Tower
> P.O. Box 250807
> Charleston, South Carolina 29425
>
> PH (843) 792-4225
> FAX (843) 792-1358
>
> E-mail: kunzf@musc.edu
> =========================================================

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