in reply to Re: for loop localisation bug?
in thread for loop localisation bug?
Turing goes a step further and explicitly forbids the use of an iterator variable outside of the loop its used in. In that language you dont have to declare an iterator, and it disappears as soon as the loop terminates.
And I believe the reason for this logic is that the value can be undefined depending on how the compiler handles it. Ie:
for my $i (0..10) { print "$i\n" }
Could be optimised into ten print statements with no iterator at all.
First they ignore you, then they laugh at you, then they fight you, then you win.
-- Gandhi
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: for loop localisation bug?
by BrowserUk (Patriarch) on Dec 29, 2003 at 19:12 UTC | |
by demerphq (Chancellor) on Dec 29, 2003 at 19:22 UTC |