Declare as local, really needed?

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

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.

That's not what he meant! In your example, x is defined once when the loop is initiated. What he meant, was something like this...

SuperStrict

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

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.