﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1677	ContinueLoop multiple level unpredictable behavior	Ascend4nt	Jpm	"Hi, I've recently had a WEIRD issue pop up in my code - I kept getting a ""Variable used without being declared"" error.  It turns out the issue has to do with ContinueLoop on multiple levels (ContinueLoop #).

Since I removed the inner loop and forgot to remove the '2' from ContinueLoop, it was jumping to another loop.  However, here's the funky thing - the OTHER loop was in another function! (in this case, the calling function).

I've successfully reproduced the issue here:

{{{
Func TestContinueLoopIssue($iValue)
	While 1
		If $iValue Then
			ContinueLoop 2
		EndIf
	Wend
EndFunc

Func OuterFunc()
	Local $iVal=5
	While 1
		$iVal+=1
		ConsoleWrite(""OuterFunc $iVal=""&$iVal&@CRLF)
		If $iVal>1000 Then ExitLoop
		TestContinueLoopIssue($iVal)
	WEnd
EndFunc

OuterFunc()
}}}

'''Output:'''
OuterFunc $iVal=6
C:\testscript.au3 (12) : ==> Variable used without being declared.:
$iVal+=1
^ ERROR
->05:51:17 AutoIT3.exe ended.rc:1

As you can see, it seems to 'continue' the loop in the calling function - but since the variable is local to that function, it will not recognize them, thus the crash."	Bug	closed	3.3.7.0	AutoIt	3.3.6.0	None	Fixed	ContinueLoop multiple levels	
