Allows program flow to 'jump out' of loops, continuing execution after the relevant closing keyword.
Exit
The Exit keyword allows program flow to 'jump out' of Repeat and While loops, continuing execution after the relevant closing keyword.
x
=
1
Repeat
x
=
x
+
1
If
x
=
3
Then
Exit
Forever
' Program flow will continue here after Exit
Print
"Exited loop!"
x
=
1
' Inner loop example
Repeat
Repeat
x
=
x
+
1
If
x
=
3
Then
Exit
Forever
' Program flow will continue here after Exit
Print
"Exited inner loop!"
Forever