Skip to main content
Previous sectionNext section

CONTINUE

Jumps to FOR or LOOP statements and re-executes test and loop.

Synopsis

CONTINUE

Arguments

The CONTINUE statement does not have any arguments.

Description

The CONTINUE statement is used within the code block of a FOR...NEXT or LOOP...REPEAT statement. CONTINUE causes execution to immediately jump back to the FOR or LOOP keyword, starting a new iteration of the loop. The FOR or LOOP statement evaluates its test condition, and, based on that evaluation, may re-execute the code block loop.

Example

The following example illustrates the use of the CONTINUE statement:

FOR i=1 TO 10
  PRINT i
  IF i=5 THEN CONTINUE
  ELSE PRINT "not five"
NEXT
PRINT "all done"
Copy code to clipboard

See Also