Declaring variables mid-function changes results

BlitzMax Forums/BlitzMax Programming/Declaring variables mid-function changes results

Don't see how he could have removed anything that would not mean his code is broken for Strict/SuperStrict. If x is not defined before the first if chain starts where it is used.
-> can not be strict so its no BM code but Blitz3D code as nonstrict is only there for exactly this use, the BB importer (its the only mode that allows goto and implicit object -> int assignements)

Thats a known fact since strict was introduced:

Without Strict, you are in Blitz3D / Plus compatibility mode.
This mode knows only 1 type of scope: Function/Method. Everything else is within the same scope, so locals are wothless as only the ending of a function/method will remove "locals". Using them within IF will lead to dublicate identifier error etc

And the speed drop is caused by exactly that, as stuff remains much longer (if not forever) within scope and is not cleared unless you forcefully null them. Something that has a large impact if you normally use local within ifs, loops etc.

Not programming with at least Strict(better SuperStrict to prevent errors through implicit int casts) is considered slugish programming and is not acceptable for BM, as it disables most of BMs optimations for the math end.