Previous Table of Contents Next


3.11.1 Basic Types


   The syntax for the supported basic types is as follows:

   Each OMG IDL data type is mapped to a native data type via the appropriate language mapping. Conversion errors between OMG IDL data types and the native types to which they are mapped can occur during the performance of an operation invocation. The invocation mechanism (client stub, dynamic invocation engine, and skeletons) may signal an exception condition to the client if an attempt is made to convert an illegal value. The standard system exceptions that are to be raised in such situations are defined in Section 4.12, “Exceptions,? on page 4-63.

   3.11.1.1 Integer Types

   OMG IDL integer types are short, unsigned short, long, unsigned long, long long and unsigned long long, representing integer values in the range indicated below in Table 3-11.

   Table 3-11 Range of integer types

short

-215 .. 215 - 1

long -231 .. 231 - 1
long long -263 .. 263 - 1
unsigned short 0 .. 216 - 1
unsigned long 0 .. 232 - 1
unsigned long long 0 .. 264 - 1

   3.11.1.2 Floating-Point Types

   OMG IDL floating-point types are float, double and long double. The float type represents IEEE single-precision floating point numbers; the double type represents IEEE double-precision floating point numbers.The long double data type represents an IEEE double-extended floating-point number, which has an exponent of at least 15 bits in length and a signed fraction of at least 64 bits. See IEEE Standard for Binary Floating-Point Arithmetic, ANSI/IEEE Standard 754-1985, for a detailed specification.

   3.11.1.3 Char Type

   OMG IDL defines a char data type that is an 8-bit quantity that (1) encodes a single-byte character from any byte-oriented code set, or (2) when used in an array, encodes a multi-byte character from a multi-byte code set. In other words, an implementation is free to use any code set internally for encoding character data, though conversion to another form may be required for transmission.

   The ISO 8859-1 (Latin1) character set standard defines the meaning and representation of all possible graphic characters used in OMG IDL (i.e., the space, alphabetic, digit and graphic characters defined in Table 3-2 on page 3-3, Table 3-3 on page 3-4, and Table 3-4 on page 3-4). The meaning and representation of the null and formatting characters (see Table 3-5 on page 3-5) is the numerical value of the character as defined in the ASCII (ISO 646) standard. The meaning of all other characters is implementation-dependent.

   During transmission, characters may be converted to other appropriate forms as required by a particular language binding. Such conversions may change the representation of a character but maintain the character’s meaning. For example, a character may be converted to and from the appropriate representation in international character sets.

   3.11.1.4 Wide Char Type

   OMG IDL defines a wchar data type that encodes wide characters from any character set. As with character data, an implementation is free to use any code set internally for encoding wide characters, though, again, conversion to another form may be required for transmission. The size of wchar is implementation-dependent.

   3.11.1.5 Boolean Type

   The boolean data type is used to denote a data item that can only take one of the values TRUE and FALSE.

   3.11.1.6 Octet Type

   The octet type is an 8-bit quantity that is guaranteed not to undergo any conversion when transmitted by the communication system.

   3.11.1.7 Any Type

   The any type permits the specification of values that can express any OMG IDL type.

   An any logically contains a TypeCode (see Section 4.11, “TypeCodes,? on page 4-53) and a value that is described by the TypeCode. Each IDL language mapping provides operations that allow programers to insert and access the TypeCode and value contained in an any.