ELSE Syntax Error
Root / SmileBASIC Bug Reports / [.]
MZ952Created:
I'm not sure of this is a true error, but this error does not occur with any other phrase other than theELSE's.
IF X THEN INC X,5UNSHIFT Y$,"A"Perfectly legal, executable code. You do not need to include the space (or colon) after the number 5 because the parser handles it.
IF X THEN INC X,5ELSE UNSHIFT Y$,"A"SYNTAX ERROR The phrase ELSE is not even highlighted. Same goes for ELSEIF. Not sure if this could truly be classified as a bug, but it would seem to go against my preconceived notions of SB syntax highlighting, and SB syntax in general.
It's because when an E is after a number, it expects another number after the E, like 1E5 (10000), 1.5E-3 (.0015), 1.1E+2(110), etc.
What they should've done is just not group the E with the number when it's invalid, but I guess they expected people to always use colons to separate lines of code.