Details of IDL

A description of IDL includes some elements.

In the explanation below, we define the identifier as names which consist of alphanumeric characters with start with the element followed by an underscore ('_').

Module statement

We define the module's name.

Module module_name;
        

module_name is the identifier of the module. You should define the module name first in IDL file.

Define statement

We define an interface of a function which called from the remote program.

Define function_name (parameter1,parameter2,...) 
"...description..."
interface_body
        

Function name is "function_name." We describe this parameter as follows.

 mode  type_specifier  parameter_name
        

Mode specifies whether an argument is input or output. If the argument is input, you write "mode_in" or "IN." If the argument is output, you should write "mode_out" or "OUT." And, if you want to allocate temporary data, you can specify "work." the "type_specifier" supports the names of the fundamental data type in C language, "string," which stands for string, "filename which stands for file specifyed filename and "filepointer" which stands for filepointer.

You can specify arguments of an array in C language.

 mode  type_specifier  parameter_name[size]...
        

Arguments of a multi-dimensional array are enclosed in brackets ([...]) for each dimension, as in C language.

You can describe the upper limit, bottom limit and stride of a transferred array area.

 mode  type_specifier  parameter_name[size:low,high,stride]...
        

Between the body information about the function is described in a string.

In the body, you need to conform to C language.

Define function_name (...) { in manner of C language }
        

In the description of a function of C , arguments are accessed as a parameter variable.

And, if you call a function which is linked, you write the function call after the Call directive.

Define function_name (...) Calls foo(...);
        

Globals statement

You can describe in programs written in C language the functions and data which are to be used in an entire module. For example, you can describe a necessary function definition when you define the definition of the function in C language. And, you can describe variables which are shared in functions and multiple functions.

Globals { ... any programs }
        

Fortranformat statement

This specifies the rule of function mangling when function link to FORTRAN program.