BlitzMax's use of the Global Variable?

BlitzMax Forums/BlitzMax Programming/BlitzMax's use of the Global Variable?

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.

tonyg, sure you have to declare Globals inside a function to use them that way, but you don't have to assign them a number

Global var

If during the course of that function var=15 (the first time the function is called it will be 0 of course) then the next time the function is called it will start at the value of 15.

Very handy for many things, such as if a handle is used to load an image inside a function, you don't want that image reloaded every time the function is called...