Declare as local, really needed?

BlitzMax Forums/BlitzMax Programming/Declare as local, really needed?

In this example y will always return 1 because it's reset to 0 before it gets 1 added to it with every iteration of the loop.

Wouldn't using Global (which isn't really a Global in this case, but rather a static local) solve that:

SuperStrict

For Local x:Int=0 Until 10
	Global y:Int
	y:+1
	Print x+" "+y
Next

Y still exists only within the loop but increments as desired.