SecondBASIC Documentation v3

Home / Command Reference / Continue


Description: Interrupts the normal execution of a loop. Any statements after the Continue command will be skipped and the next iteration of the loop will begin.


Continue <loop>

Part Description
<loop> Required. This is type of loop you're in that you want to jump to the next iteration. Valid <loop> values are For, While, Do, and Loop. Both Do and Loop are identical.

Notes: Be careful when using Continue in both Do...Loop and While...Wend loops as you can easily create an infinite loop.


        a = 1
        Do While a < 10
                If a > 3 Then Continue Do
                Print a
        a = 1
        While a < 10
                If a > 3 Then Continue While
                Print a
        For a = 1 To 10
                If a > 3 Then Continue For
                Print a