
' -------------------------------------------
'  INFINITE FOR NEXT

'  This demo shows:

'  - How to create infinite loops

'  - How to exit from the FOR loop

' -------------------------------------------

' Press SPACE to exit from the FOR LOOP

For v1 = 1 To Infinity
	
	If Key("SPACE")
		v1 = Infinity
	EndIf
	
	Print v1
	Wait Seconds 0.01
Next

Stop



' -------------------------------------------
'  You could also exit with the Exit keyword
'  as shown in the next example
' -------------------------------------------

For v1 = 1 To Infinity
	
	If Key("SPACE")
		Exit
	EndIf
	
	Print v1
	Wait Seconds 0.01
Next




'WATCH v1
