FOR without NEXT error message points to incorrect place

Previous topic - Next topic

MrTAToad

I've noticed that the above error message doesn't usually point to the offending FOR statement (and usually chosens a completely inappropriate line) - would it be possible to make it slightly more accurate ?

FutureCow

Can you put a short piece of example code?

MrTAToad

The best I can get (with a small example) is :

Code (glbasic) Select
FOR a=1 TO 3
WHILE 1
FOR b=1 TO 3 <- Error is regarded to be here
NEXT
WEND

With the error

FutureCow

I can confirm I get the error too - it seems to be evaluating the FOR/NEXT loops from the top down rather than the inner loop outwards.

Kitty Hello