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...
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...