Global inside a Function

BlitzMax Forums/BlitzMax Beginners Area/Global inside a Function

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.

The global-in-a-function behaves like any other global variable except that it is being initialised when the function is called for the first time and can only be accessed from within the function. So the example prints:
Global in Function
0
1
2
3
4
Local in Function
0
0
0
0
0