From Xojo Documentation
|You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!|
Used to to continue execution with the next iteration of a loop, skipping any other code.
|LoopVariable||Datatype of a loop variable: Integer, Single, or Double||The loop variable that controls iteration of the loop that you want to continue.|
The Continue statement enables you to jump to the end of a loop and continue execution without executing the lines of code between the Continue statement and the end of the loop. If there is ambiguity concerning which loop you mean, you can use the second or third syntaxes to clarify the situation. For example, if you have nested For...Next loops and want to jump from a line in the innermost loop to the outermost loop, you can use the last syntax to identify the loop variable that controls the outermost loop.
Count the sum from 1 to 100, skipping the number 2 and 31:
If you have nested For loops and want to jump from a line in the innermost loop to the outermost loop, you can use the last syntax to identify the loop variable that controls the outermost loop.
For j As Integer = 1 To 200
If j = 50 Then
Continue For i // Exits For j and resumes For i