|
|
![]() | Syntax: switch ( Expression ) Statement
|
![]() | Semantics: The expression is computed and must of
integer type (byte, int, or long) or
of type char. If a matching case label is found within
Statement, the execution jumps to that point. If not,
the execution continues at the default label,
if provided. Otherwise, Statement is skipped.
|
![]() | Syntax of case labels:
case ConstantExpression : default : |
![]() | The labels come in front of a statement and multiple
labels are permitted.
|
![]() | The break statement allows to leave a
switch statement. Syntax: break ;
|
![]() | Layout according to our coding standard:
select ( Expression ) { |
|
| Copyright © 2001, 2002 Andreas Borchert, converted to HTML on February 11, 2002 |