|
||||||||||||
|
|
||||||||||||
ContinueContinue may occur only as long as there is at least one enclosing statement of the type block (which must be labeled), do, for, foreach, or while. Continue targets to the innermost statement of the given type (but not unlabeled block), or if a label is given, to the enclosing statement referred to by the label. Continue continues to the next cycle (or to the start of a block) of the target statement, executing all passed finally statements. When used inside switch statement two altenate forms are available:
case´´ keyword, followed by constant expression
pointing to existing case branch with same key.
Execution is forwarded to given case.
default´´ keyword, which effectily jumps to start
of default brach (which must exist).
These two forms come in handy for writing state machines. continue := "continue" [ symbollabel ] [ stmt-modifier ] ";" continue := "continue" [ symbollabel ] "case" exprconstant [ stmt-modifier ] ";" continue := "continue" [ symbollabel ] "default" [ stmt-modifier ] ";"
See also
| Statements
| Continue .. case
| Simple statements
| Do .. while
| For
| Foreach
| Switch
| While
| <continue>
| Statement modifiers
| Statement labels
| Grammar
|
||||||||||||
|
|
||||||||||||