AMT Help Files
homeLION Language ReferenceCommandsBREAK (BK)

BREAK (BK)

Syntax

BREAK [OUTMOST]

Diagram

Description

Terminates execution of the current loop and continues with the first line of code after the loop.
In the example below after the first BREAK code execution will continue at LOOP FOR, and after the BREAK OUTMOST it will continue after the second ENDLOOP.

Returned value type

None

Parameters

Parameter Description
OUTMOST Terminates execution of all current nested loops and continues with the first line of code after the outermost loop.

Remarks

Break will break out of any loop including READFILE loops, etc.

Example

loop for sn-vert := 1 to screen.occursvert
  if screen[1, sn-vert] = '' then bk
  loop for sn-horz := 1 to screen.occurshorz
    if screen[sn-horz, sn-vert] = '' then bk outmost
    if not screen[sn-horz, sn-vert] in ['', 'I', 'C', 'A', 'D']
      smex ('Only I/C/A/D allowed!',, screen[sn-horz, sn-vert])
    endif
  endloop
endloop

Return to

Commands

Contents

 Go to top