OSF DCE Application Development Guide--Core Components
OSF DCE Application Development Guide—Core Components
• ptr: The type being declared is a full pointer.
• unique: The type being declared is a unique pointer.
• string: The array type being declared is a string type.
17.10.2 BaseType Specifiers
IDL base types include integers, floating-point numbers, characters, a boolean type, a
byte type, a void type, and a primitive handle type.
Table 17-2 lists the IDL base data type specifiers. Where applicable, the table shows the
size of the corresponding transmittable type and the type macro emitted by the IDL
compiler for resulting declarations.
TABLE 17-2. Base Data Type Specifiers
_______________________________________________________
Specifier Type Macro
(sign) (size) (type) Size Emitted by idl
_______________________________________________________
_______________________________________________________
small int 8 bits idl_small_int
_______________________________________________________
short int 16 bits idl_short_int
_______________________________________________________
long int 32 bits idl_long_int
_______________________________________________________
hyper int 64 bits idl_hyper_int
_______________________________________________________
unsigned small int 8 bits idl_usmall_int
_______________________________________________________
unsigned short int 16 bits idl_ushort_int
_______________________________________________________
unsigned long int 32 bits idl_ulong_int
_______________________________________________________
unsigned hyper int 64 bits idl_uhyper_int
_______________________________________________________
float 32 bits idl_short_float
_______________________________________________________
double 64 bits idl_long_float
_______________________________________________________
char 8 bits idl_char
_______________________________________________________
boolean 8 bits idl_boolean
_______________________________________________________
byte 8 bits idl_byte
_______________________________________________________
void — idl_void_p_t
_______________________________________________________
handle_t ——
_______________________________________________________
The base types are described individually later in this chapter.
Note that you can use the idl_ macros in the code you write for an application to ensure
that your type declarations are consistent with those in the stubs, even when the
application is ported to another platform. The idl_ macros are especially useful when
passing constant values to RPC calls. For maximum portability, all constants passed to
RPC calls declared in your network interfaces should be cast to the appropriate type
because the size of integer constants (like the size of the int data type) is ambiguous in
the C language.
17 − 16 Tandem Computers Incorporated 124245