Avoiding using globals..

BlitzMax Forums/BlitzMax Beginners Area/Avoiding using globals..

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Locals make sense in loops. Every variable in a list of types is gonna have the impact of a type anyway, so don't worry about it.

If you're paranoid, benchmark your game, then when you reach a loop, put the global inside a local in that loop if you can. You won't see much difference...

For in-loop calculations you want locals, and all temp vars should be locals.