SmileBASIC will automatically optimize parts of expressions that use numerical constants and operators.
This means you can write code like this:
FOR I=0 TO 16-1 ...
'and it won't be any slower than:
FOR I=0 TO 15 ...
Note that SB will not use mathematical simplification. For example:
X*2*3
'will not simplify to
X*6
To make SB simplify it, the multiplication of 2*3 must be done first, either X*(2*3) or 2*3*X
Logical and comparison operators are not simplified (&& || > < >= <= == !=), nor are any string operations (string+string, string*number).

2 Comment(s)MZ952Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthDrawingI like to draw!HobbiesReadingI like to read books!HobbiesWhat about functions like SQR(2) or POW(5,4)?12Me21AdminSyntax 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 oldWebsiteUnfortunately, no.