Statalist The Stata Listserver


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

Re: st: foreach-question


From   Richard Williams <[email protected]>
To   [email protected], [email protected]
Subject   Re: st: foreach-question
Date   Fri, 21 Apr 2006 07:42:59 -0500

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.




-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc

*
* 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index