GLBasic forum

Main forum => Bug Reports => Topic started by: MrTAToad on 2009-Sep-27

Title: FOR without NEXT error message points to incorrect place
Post by: MrTAToad on 2009-Sep-27
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 ?
Title: Re: FOR without NEXT error message points to incorrect place
Post by: FutureCow on 2009-Sep-28
Can you put a short piece of example code?
Title: Re: FOR without NEXT error message points to incorrect place
Post by: MrTAToad on 2009-Sep-29
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
Title: Re: FOR without NEXT error message points to incorrect place
Post by: FutureCow on 2009-Oct-01
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.
Title: Re: FOR without NEXT error message points to incorrect place
Post by: Kitty Hello on 2009-Oct-01
Yes. It's on the bug list.