Name

ExitWhile() — Exit from a While() loop, whether or not the conditional has been satisfied

Synopsis

ExitWhile()

Will cause a While() loop to exit whether or not the conditional expression has been satisfied.

exten => 123,1,Set(COUNT=1)
exten => 123,n,While($[${COUNT} < 5])
exten => 123,n,GotoIf($[${COUNT} != 3]?continue)
exten => 123,n,ExitWhile()
exten => 123,n(continue),NoOp()
exten => 123,n,SayNumber(${COUNT})
exten => 123,n,Set(COUNT=$[${COUNT} + 1])
exten => 123,n,EndWhile()

See Also

While(), ContinueWhile(), EndWhile()