Continue
Positron16 · Revision 1.1.3.5 · PDF page 309
Syntax
Continue
Overview
Cause the next iteration of a For…Next, While...Wend, Repeat...Until or Do…Loop condition to occur. With a For…Next loop, Continue will jump to the Next part. With a While…Wend loop, Continue will jump to the While part. With a Repeat…Until loop, Continue will jump to the Until part. With Do…Loop, Continue will jump to the Loop part.
Example
' Create and display a For-Next loop's iterations, missing out number 10
Device = 24FJ64GA002 ' Select the device to compile for
Declare Xtal = 16
Declare Hserial_Baud = 9600 ' USART1 Baud rate
Declare Hrsout1_Pin = PORTB.14 ' Select the pin for TX with USART1
Dim Index as Byte
RPOR7 = 3 ' Make PPS Pin RP14 U1TX
For Index = 0 to 19 ' Create a loop of 20 iterations
If Index = 10 Then Continue ' Miss out number 10
HrsoutLn Dec Index ' Display the counting loop
DelayMs 100 ' Slow things down to see what's happening
Next ' Close the loop
See also : Break, Do…Loop, For…Next, Repeat…Until, While…Wend.
