SwitchStatement ::= |
switch Expr |
Used by: |
This switch -case -default statement is a basic flow-control statement that should be familiar to any programmers. For case clauses, the value label can be any constants, such as strings.
The break statement can be used to jump out of a case; otherwise, control continues on the next statement in another case. The parentheses for the value expression are optional.