OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
By default, the IDL compiler resolves relative pathnames of imported files by looking
first in the current working directory and then in the system IDL directory. The -I option
of the IDL compiler allows you to specify additional directories to search. You can
thereby avoid putting absolute pathnames in your interface definitions. For example, if
an imported file has the absolute pathname /dbproject/src/dbconstants.idl, then the IDL
compiler option -I/dbproject/src allows you to import the file by its leaf name,
dbconstants.idl.
11.2.6 Constant Declarations
The IDL const declaration allows you to declare integer, Boolean, character, string, and
null pointer constants, some of which are shown in the following examples:
const short TEN = 10;
const boolean VRAI = TRUE;
const char* JSB = "Johann Sebastian Bach";
11.2.7 Type Declarations
To support application development in a variety of languages and to support the special
needs of distributed applications, IDL provides an extensive set of data types, including
the following:
Simple types, such as integers, floating-pointing numbers, characters, Booleans, and
the primitive binding-handle type handle_t (usually equivalent to
rpc_binding_handle_t)
Predefined types, including ISO international character types and the error status type
error_status_t
Constructed types, such as strings, structures, unions, arrays, pointers, and pipes
The IDL typedef declaration lets you give a name to any types you construct.
The general form of a type declaration is
typedef [type_attribute,...] type_specifier type_declarator,... ;
where the bracketed list of type attributes is optional. The type_specifier specifies a
simple type, a constructed type, a predefined type, or a type previously named in the
interface. Each type_declarator is a name for the type being defined. As in C, arrays and
pointers are declared by the type_declarator constructs [](brackets) and * (asterisk).
The following type declaration uses the IDL’s simple data type, long (a 32-bit data type),
to define the integer32 integer type:
typedef long integer32;
11 14 Tandem Computers Incorporated 124245