Introduction | Language Structure | IB Statements | File System | Comet 32 Runtime | Index |
| Syntax: | CONTINUE |
| Discussion: |
The CONTINUE statement passes control to the NEXT
statement in a FOR/NEXT structure or to the
LOOP statement in a DO/LOOP
structure.
A CONTINUE statement must occur within a FOR/NEXT structure or a DO/LOOP structure. If a CONTINUE statement occurs within an IF/THEN or IF/THEN/ELSE structure, the IF structure must itself be within a FOR/NEXT loop or DO/LOOP structure, and the CONTINUE statement refers to the FOR or DO structure, accordingly. There can be multiple CONTINUE statements within a given FOR/NEXT or DO/LOOP structure. |
| Example: |
DO WHILE A LT 100 ! Start the loop
.
IF A=B ! If A = B, then
CONTINUE ! jump to the LOOP statement
ELSE ! otherwise
. ! execute these statements
.
ENDIF ! End the IF structure
.
LOOP ! End the DO structure
|