Positron Compiler Documentation

Continue

Source: Positron8 Compiler User Manual, PDF page 301

Syntax

Continue

Overview

Cause the next iteration of For…Next, While...Wend or Repeat...Until or Do…Loop conditions 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.

Example

' Create and display a For-Next loop's iterations, missing out number 10
  Device = 18F26K40
                                ' Tell the compiler what device to compile for
  Declare Xtal = 16
                           ' Tell the compiler the device will be operating at 16MHz
  Declare Hserial_Baud = 9600 ' Choose the Baud rate for HRsoutLn
  Dim bIndex as Byte
  For bIndex = 0 to 19
                                     ' Create a loop of 20 iterations
     If bIndex = 10 Then Continue  ' Miss out number 10
     HRsoutLn Dec bIndex
                                     ' Display the counting loop
     DelayMs 100
                                     ' Slow things down to see what's happening
  Next
                                     ' Close the loop

See also : Break, For…Next, Repeat…Until, While…Wend.