CONTINUE
Next Iteration of a Loop Control
This directive causes the next iteration of a FOR/NEXT or WHILE/WEND loop to be executed.
Syntax
Section titled “Syntax”CONTINUERemarks
Section titled “Remarks”This directive is generally available starting with release level 8.8.0.
For nested loops, this directive will cause the next iteration of the innermost FOR/NEXT or WHILE/WEND loop to be executed.
If a CONTINUE is executed without a FOR/NEXT or WHILE/WEND loop on the stack, an ERR=28 results.
If this directive is used in Thoroughbred Basic Console Mode, an ERR=45 results.
Examples
Section titled “Examples”01000 FOR MON = 1 TO 12; IF MON > 5 AND MON < 9 CONTINUE FI; TOTSALES = TOTSALES + SALES[MON]; NEXT MON; PRINT TOTSALES;prints the cumulative total of the SALES array not including the values in SALES[6], SALES[7] and SALES[8]. .
01000 MON = 1; WHILE MON < 12; IF MON > 5 AND MON < 9 MON = MON + 1; CONTINUE FI; TOTSALES = TOTSALES + SALES[MON]; MON = MON + 1; WEND; PRINT TOTSALES;prints the cumulative total of the SALES array not including the values in SALES[6], SALES[7] and SALES[8].
See also
Section titled “See also”BREAK, FOR/NEXT, and WHILE/WEND directives
From the Thoroughbred Basic Language Reference, Volume I: A–E, version 8.9.1. Open this page in the PDF