ITERATE statement
Purpose: Start the next iteration of a loop early in control loops
Syntax 1:
ITERATE
|
Remarks: ITERATE has the effect of jumping to the instruction just before the LOOP, WEND, NEXT or END REPEAT statement in the currently executing block
Example:
DIM A,B CLS PRINT "This will print Iterations 7 thru 10 of the outer loop" PRINT "and will print the numbers 999 and 1000 from within" PRINT "the inner loop. All 10,000 iterations still occur," PRINT "it's the ADDED LEVEL OF CONTROL within your loops that " PRINT "ITERATE gives to you." FOR B = 1 TO 10 IF B < 7 THEN ITERATE PRINT PRINT "<Outer Loop> Iteration Number", B FOR A=1 TO 1000 IF A < 999 THEN ITERATE PRINT ">Inner Loop< Iteration Number", A NEXT NEXT
BCX Console Sample Programs using ITERATE function.