Statalist The Stata Listserver

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

RE: st: foreach-question

From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: foreach-question
Date   Fri, 21 Apr 2006 19:05:57 +0100

To clarify a little: there are two limits here. 
The question is which bites; it will naturally be  
the more restrictive one. 

See -help limits-. 

In Stata 9.2, 
                             Small    Intercooled       Stata/SE|MP 
length of string in string     244            244            244
# of characters in a macro   8,681         67,784      1,081,511

It is not clear why Johannes was bitten here, unless he
is using some earlier version of Stata, but did not tell
us that. 

[email protected] 

Richard Williams 
> At 06:04 AM 4/21/2006, Maarten buis wrote:
> >There doesn't appear anything wrong with your
> >�foreach- command, however a local can contain
> >only a limited number of characters, and your
> >list of variables probably contains too many
> >characters. All extra characters are ignored,
> >so apparently the maximum was reached with
> >kzahl and was thus ignored. One way to prevent
> >that is to replace the line
> Good point.  I hadn't thought of that - and my 
> simulation had no problems - but another simple 
> way around that is to not use the equals sign, e.g.
> local wave "l m n o p q r s t u"
> local vars "netto pbleib pbbil01 pbbil02 pbbil03 
> phrf famstd stell pnat nace psbil hhgr eigen kzahl"
> You can get a lot more characters into a local 
> macro when you avoid the equals sign.

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index