The switch statement performs the same kind of comparison as the third format of the if/else statement; it executes a specific statement or set of statements based upon the comparison of different simple type constants to a simple type variable.
A fixed-length variable is one of the following types: int, short, long, char, and
the unsigned variants of those, namely, unsigned int, unsigned
short, unsigned long, and unsigned
char. All other types, including string and float,
are considered complex datatypes in ODL, and do not work correctly
as variables in the switch statement.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |