Updated: 11/30/2021, 7:00:45 PM
Created: 11/30/2021, 7:00:45 PM
Last Updated By: Jake Tuttle
Read Time: 1 minute(s)

Tags: program control

# Description

The CONTINUE statement is the complimentary statement to the BREAK statement, without arguments. If used within a loop, program execution will skip the remaining code after the ‘continue’ statement in the current iteration and proceed directly on to the next iteration.

The compiler will issue a warning message and ignore the statement if it is found outside an iterative  loop such as FOR...NEXT, LOOP...REPEAT.

An example of use is as:

FOR index = 1 TO 30
    IF MOD(index,2) = 0  THEN CONTINUE
    ELSE CRT index
NEXT index

The above example will execute the loop 30 times but will only print the value of "index" when "index" is an odd number.

See also: BREAK, EXIT

Go back to jBASE BASIC

Go back to Programmers' Reference Guide