<<

Contents

Search

>>

 

BREAK

 

 

Instruction

 

 

Syntax:

BREAK

 

Meaning:

Stops the current FOR or WHILE loop.

 

With the next instruction program execution continues at ENDLOOP or ENDDO respectively.

 

BREAK only works within FOR and WHILE loops.

 

With FOR-/WHILE loops that are nested several times BREAK always refers to the innermost loop that contains the instruction.

 

Sample:

FOR I% = 1 to 10
    ...
    IF I% > 5 AND H$ = ""
    THEN BREAK
    ENDIF
ENDLOOP

See also:

CONTINUE

FOR

WHILE