# CONTINUE

Updated: 10/19/2021, 9:29:48 PM
Created: 10/19/2021, 9:29:48 PM
Last Updated By: Kevin Munoz
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
1
2
3
4

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