Home > lang > break 
 en fr de es it nl pl pt pt_BR mk sq ca hu cs tr ar fa id vi ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Search  Administration  
Documentation  
Warning! This page is not translated.  See english version 
BREAK
BREAK

Leaves 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

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