Home > lang > break 
 fr de es it nl pl pt pt_BR mk sq ca ar fa vi ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration  
Documentation
History
 
BREAK
Syntax
BREAK

Leaves the loop immediately.

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

Examples

PUBLIC SUB Button1_Click()

  DIM X AS Integer

  FOR X = 1 TO 1000
    IF X = 200 THEN BREAK
    PRINT X
  NEXT

END

See also

Loop Control Structures