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)?12Me21Head AdminVideo GamesI like to play video games!HobbiesFirst YearMy account is over 1 year oldWebsiteExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming StrengthUnfortunately, no.