EXIT

EXIT

Top  Previous  Next

 

The EXIT statement terminates execution of  a LOOP/REPEAT or FOR/NEXT structure.

 

 

Format

 

EXIT

 

 

The EXIT statement is equivalent to a jump to the statement following the REPEAT or NEXT statement of the innermost loop structure.

 

 

Example

 

LOOP

  REMOVE ITEM FROM STOCK SETTING DELIM

  ...processing statements...

WHILE DELIM

  IF ITEM[1,1] = "A" THEN EXIT

  ...further statements...

REPEAT

 

This program fragment processes items extracted from the STOCK dynamic array. If the value of ITEM commences with "A", the program exits from the loop.

 

 

See also:

CONTINUE, FOR/NEXT, LOOP/REPEAT, WHILE, UNTIL