Am 20.11.2016 um 18:20 schrieb Allin Cottrell:
I don't think this is new. The point is that if the index "i" is not
declared outside of the loop it is considered an automatic variable
which exists only for the scope of the loop. So you could get the
effect you expected by sticking in
scalar i
before the loop. (Then the function will return 1).
So you don't think it's a bug? I mean the 'return' statement _is_ inside
the loop where the loop index is declared. I don't see the difference to
the general situation where 'return x' is written with 'x' existing only
locally in the function scope. Or to put it differently, shouldn't the
statement 'loop i= ...' be considered a declaration of the index variable i?
thanks,
sven