Dear Statalisters,
I am trying to loop over 1870 cases using the -foreach- function, e.g.:
. foreach n of numlist 1/1870{ display(`n')}
invalid numlist has too many elements
r(123);
Does anybody know what's the maximum number of elements of a -numlist-?
Thanks beforehand for the attention,
Euler P.G de Mello
[stata 7.0, win 98]
Ps.:
I have already managed to circunvene this situation by using
something like:
local step=0
foreach n of numlist 1/2 {
foreach m of numlist 1/5 {
display(5*`step'+`m')
}
local step=`step'+1
}
*
* 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/