2.0
3.0
>
lang
>
break
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