BREAK

BREAK

Leave the current loop immediately. Opposite of CONTINUE.

Unlike other Basic dialects you do not need EXIT DO, EXIT FOR, EXIT LOOP, EXIT WHILE etc. in Gambas.

Example

Dim X As Integer

For X = 1 To 100
  If X = 20 Then Break
  Print X
Next
1 ...

See also