LoginLogin
Might make SBS readonly: thread

IF statement bugs

Root / SmileBASIC Bug Reports / [.]

MZ952Created:
IF 0 THEN
 ELSE
 STOP
ENDIF
Break on 0:2 The console displays the wrong line for where the STOP instruction occurred.
IF 0 THEN
 ELSEIF 0
ENDIF
Syntax error in 0:3 The console displays the wrong line for the syntax error, one line ahead (regardless what that line is).
IF 0 THEN
 ELSE
 ELSEIF 0
ENDIF
Syntax error in 0:2 The console displays the wrong line for the syntax error, one line behind at the ELSE statement.
IF 0 THEN
 ELSE
 N%
 ELSEIF 0
ENDIF
Syntax error in 0:4 Now it's on ELSEIF 0, correctly, however it disregards the other.
IF 0
ENDIF
Syntax error in 0:2 One line after. It gets weirder.
IF 0




'TEST



ENDIF
Syntax error in 0:6 It errors at 'TEST. In fact, it will always error at the next non-empty line. This does not apply to the others above.
IF 0 'THEN


'TEST


ENDIF
Syntax error in 0:4 Still errors at the next non-empty line. Conclusion: If statements are broken.