![]() |
Constants are declared in IDL just as in C++, except that the type of the constant must be a valid IDL type. IDL Constant declarations take the following form:
- const const-type identifier=constant-expression;
The const-type must be a valid IDL integer, char, boolean, floating point, string, or user-defined type name. The identifier is the name of the constant being defined. The constant-expression is a constant expression as in C or C++, and can include the usual C or C++, unary and binary operators (|, ^, &, >>, <<, +, -, *, /, %, ~~), parentheses for controlling operator precedence, literal values (integer, string, character, and floating point), and the boolean literal values TRUE and FALSE.