n=10 for i = 1 to n print i if i = 5 then n = 0 nexttypes 10 numbers at LB/JB, but only 5 at LBB.
Actually if one open right panel in LBB, FOR loop will look like
3 FOR i = 1 TO n : WHILE 1 > n EXIT FOR : ENDWHILEProbably this WHILE kicks in.
n=10 for i = 1 to n print i if i = 5 then n = 0 nexttypes 10 numbers at LB/JB, but only 5 at LBB.
3 FOR i = 1 TO n : WHILE 1 > n EXIT FOR : ENDWHILEProbably this WHILE kicks in.
Changing either the loop variable or the limit value inside a FOR loop is bad practice.
I know. But this program is big - and it's someone else's program - and I guess it just happened, historically.Changing either the loop variable or the limit value inside a FOR loop is bad practice.
Sure. I just post the difference because I stubmbled on it (and someone else might as well step on it again).I have tried to make LBB emulate LB/JB in most respects, but if you do things which are 'unexpected' or 'non standard' I can't guarantee that they will behave in the same way, and this is a case in which they don't.
This is example showing effectWhat is the code trying to achieve? Why is the variable n seemingly being used for two different things: to hold the limit value (iteration count in this case) and also as some kind of flag?