OSF DCE Application Development Guide--Core Components
OSF DCE Application Development Guide—Core Components
IDL provides only integer, Boolean, character, string, and null pointer constants.
Following are examples of constant declarations:
const short TEN = 10;
const boolean FAUX = FALSE;
const char* DSCH = "Dmitri Shostakovich";
17.9.1 Integer Constants
An integer_type_spec is a type_specifier for an integer, except that the int_size for an
integer constant cannot be hyper.
An integer is the decimal representation of an integer. IDL also supports the C notation
for hexadecimal, octal, and long integer constants.
You can specify any previously defined integer constant as the value of an integer
constant.
You can specify any arithmetic expression as the integer_const_expression that
evaluates to an integer constant.
17.9.2 Boolean Constants
A Boolean constant can take one of two values: TRUE or FALSE.
You can specify any previously defined Boolean constant as the value of a Boolean
constant.
17.9.3 Character Constants
A character is an ASCII character enclosed in single quotes. A white space character is
interpreted literally. The \ (backslash) character introduces an escape sequence, as
defined in the ANSI C standard. The ’ (single quote) character can be coded as the
character only if it is escaped by a backslash.
You can specify any previously defined character constant as the value of a character
constant.
17 − 14 Tandem Computers Incorporated 124245