#1✎ 146512Me21AdminSyntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express YourselfSecond YearMy account is over 2 years oldWebsiteStep 1: run this in slot 0
Step 2: run this in slot 0@[email protected]'something that contains the previous label and causes a syntax error
Step 3: run this in direct mode:
It will print "Hi".
Apparently you can use this to crash SB somehow.
#2✎ 474SquareFingersFor 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:
@[email protected]$="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.
#3✎ 146512Me21AdminSyntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express YourselfSecond YearMy account is over 2 years oldWebsitemaybe it's because the second program creates another variable B$ and the first one tries to access it... or something.
#4✎ 44CyberYoshi64Avatar BlockI didn't change my avatar for 30 days.WebsiteIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthNight PersonI like the quiet night and sleep late.Express YourselfI tried it myself and this is the result:
(? / 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.)
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 OK
>RUN 'or pressing START/SELECT
Syntax Error in 0:1