Declaring variables mid-function changes results

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

Yes it optimize things. Obviously it can make the code messy if you use variable names like X. but how often have you need a aux variable inside a IF block (swap values as instance), and why should this variable be alive in the whole life of the function? coding properly, that is, using clear variable names, can make this practicle a very good practicle, specially becouse you can have an idea on what's the variable used for depending on where it is created. IMHO that makes things clearer than just placing all of them at the begining of a function ala Pascal.