CONTINUE block-name

The CONTINUE block-name instruction resumes execution of a loop or dialog statement.

Syntax

CONTINUE
 { FOR
 | FOREACH
 | WHILE
 | MENU
 | CONSTRUCT
 | INPUT
 | DIALOG
 }

Usage

The CONTINUE block-name instruction transfers the program execution from a statement block to another location in the compound statement that is currently being executed.

CONTINUE block-name can only be used within the statement block specified by block-name. For example, CONTINUE FOR can only be used within a FOR ... END FOR statement block.

The CONTINUE FOR, CONTINUE FOREACH, or CONTINUE WHILE keywords cause the current FOR, FOREACH, or WHILE loop (respectively) to begin a new cycle immediately. If conditions do not permit a new cycle, however, the looping statement terminates.

The CONTINUE CONSTRUCT, CONTINUE INPUT and CONTINUE DIALOG statements cause the program to skip all subsequent statements in the current control block. The screen cursor returns to the most recently occupied field in the current form, giving the user another chance to enter data in that field.

The CONTINUE MENU statement causes the program to ignore the remaining statements in the current MENU control block and re-display the menu. The user can then choose another menu option.

CONTINUE INPUT is valid in INPUT and INPUT ARRAY statements.

Example

MAIN
  DEFINE i INTEGER
  LET i = 0
  WHILE i < 5
    LET i = i + 1
    DISPLAY "i=" || i 
    CONTINUE WHILE
    DISPLAY "This will never be displayed!"
  END WHILE
END MAIN