OpenTP1 Version 7 Programming Reference C Language

[Contents][Index][Back][Next]

Import declaration

Format

import file,...;

Meaning

The import declaration imports (fetches) an interface definition file in which the type and constant to be used have been declared.

Specification item

file

Specify a file name. Enclose the name of the IDL file to be imported in double quotation marks (").

The import file name can be defined by referencing the parent directory with the -I option of the txidl compiler.

Explanation

  1. The operation declaration is not imported.
  2. The result is the same regardless how many times the interface is imported.
  3. The file to be imported must be compiled with the txidl command in advance (only creating the header file will do).

Example
import "garlic.idl", "oil.idl";

OpenTP1 IDL-only TxRPC restriction