Terminate a While/Do/For loop.
ExitLoop [level]
A negative level or zero value has no effect.
ExitLoop will break out of a While, Do or For loop.
ExitLoop is useful when you would otherwise need to perform error checking in both the loop-test and the loop-body.
ContinueLoop, Do, Exit, For, While
#include <MsgBoxConstants.au3>
Local $iSum= 0,$iAns= 0
While 1;use infinite loop since ExitLoop will get called
$iAns= InputBox ("Running total="&$iSum,_
" Enter a positive number. (A negative number exits)")
If $iAns< 0Then ExitLoop
$iSum= $iSum+ $iAns
WEnd
MsgBox ($MB_SYSTEMMODAL,"","The sum was: "&$iSum)