Continue Statement


Continue Statement

Syntax

     Continue { Do | For | While } 

Description

New in 2005. The Continue statement immediately jumps to the next iteration of a Do...Loop, For...Next, For Each...Next, or While...End While loop construct. The second keyword of the Continue statement matches the first word of the loop construct.

Usage at a Glance

  • If you have nested loops of the same type, the Continue statement goes to the next iteration of the innermost loop (of the same type).

  • Continue Do is used for Do...Loop statements; Continue For is used for For...Next and For Each...Next statements; Continue While is used for While...End While statements.

  • Using the Continue statement may cause a loop to exit if the next iteration would normally have caused an exit of the loop.

Version Differences

The Continue statement is new with Visual Basic 2005.

See Also

Do...Loop Statement, For...Next Statement, For Each...Next Statement, While...End While Statement




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net