[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: RE: inner loop
> Nested for loops often fail if the ids are not explicitly
> For example
> for any a b c: for num 1984/2000:
> will fail but
> for X in any a b c: for Y in num 1984/2000:
> will work.
> This appears to be a bug in the for ado. Been bitten by this
> hemipteran more than once.
The bug here, I suggest, is in documentation
which suggests (or implies) that nested -for-s
will necessarily work.
The on-line help for -for- is one example.
The sad fact is that sometimes they will,
and sometimes they won't, for reasons
best explained by Alan Riley and Bobby Gutierrez
in a Statalist posting on 15 October.
The only general advice is to avoid nested
-for- in favour of -forval- and/or -foreach-.
* For searches and help try: