OSF DCE Application Development Guide--Core Components
Interface Definition Language
17.8 Import Declarations
The IDL import_declaration specifies interface definition files that declare types and
constants used by the importing interface. It takes the following form:
import file ,... ;
The file argument is the pathname, enclosed in double quotes, of the interface definition
you are importing. This pathname can be relative; the -I option of the IDL compiler
allows you to specify a directory from which to resolve import pathnames.
The effect of an import declaration is as if all constant, type, and import declarations
from the imported file occurred in the importing file at the point where the import
declaration occurs. Operation declarations are not imported.
For example, suppose that the interface definition aioli.idl contains a declaration to
import the definitions for the garlic and oil interfaces:
import "garlic.idl", "oil.idl";
The IDL compiler will generate a C header file named aioli.h that contains the following
#include directives:
#include "garlic.h"
#include "oil.h"
The stub files that the compiler generates will not contain code for any garlic and oil
operations.
Importing an interface many times has the same effect as importing it once.
17.9 Constant Declarations
The IDL constant_declaration can take any one of the following forms:
const integer_type_spec identifier = integer | value | integer_const_expression;
const boolean identifier = TRUE | FALSE | value;
const char identifier = character | value;
const char* identifier = string | value;
const void* identifier = NULL | value;
The integer_type_spec is the data type of the integer constant you are declaring. The
identifier is the name of the constant. The integer, integer_const_expression, character,
string,orvalue specifies the value to be assigned to the constant. A value can be any
previously defined constant.
124245 Tandem Computers Incorporated 17− 13