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.


Print "Global in Function"
For x = 1 To 5
	Global_in_Func
Next

Print "Local in Function"
For x = 1 To 5
	Local_in_Func
Next


Function Global_in_Func()
	Global functest:Int 
	Print functest	
		functest:+ 1
End Function

Function Local_in_Func()
	Local functest:Int 
	Print functest	
		functest:+ 1
End Function