Labels and compilation error bug thing
Root / SmileBASIC Bug Reports / [.]
12Me21Created:
For more explicit instructions:
Step 1: Run this in slot 0:
@A B$="Hi":PRINT B$It runs fine. Step 2: Run this in slot 0:
@A@B$="Hi":PRINT B$It generates a Syntax Error. Step 3: Run this in direct mode:
GOTO @AThe 'direct mode' cursor stops blinking for a couple of seconds. The system shows "An error has occurred, forcing the software to close. The system will now restart. (Unsaved data may be lost.)". Not every syntax-error-causing code in step 2 will cause this. New 3DS, SmileBasic 3.3.2.
I tried it myself and this is the result:
Old 2DS, SmileBASIC EUR 3.5.2
It turns out the "$" sign is placed in a way where SB gets confused whether "@$" is a label or a string variable.
Leaving @ and/or $ alone without alphanumerical symbols, will end up crashing SB, once you run the program and come to that point in direct mode like:
>=Input [Blank]=Output
My first conclusion which seems incorrect
(? / PRINT) B$ doesn't matter here. This can be omitted. I think SB gets confused rather if @B$ is a label or a variable and (, what SB always does,) crashes. (It doesn't matter if B$ got something in the 1st place. I tried it after SB crashed and the results were the same.)OK >RUN 'or pressing START/SELECT Syntax Error in 0:1 >GOTO @A