Matching Parameter Types

For an import procedure to match the corresponding export procedure successfully, both procedures must specify the same number of parameters. The parameters must be specified in the same order in both procedures. Further, each parameter specified by the import procedure must be of a type compatible with the equivalent parameter to the export procedure.

Parameters in Different Programming Languages

Because the system permits client programs to be written in different languages than the libraries they use, there are times when the actual and formal parameters to a library procedure are specified in different programming languages. Each programming language provides different names for the same or similar types of data.

Listings by ALGOL Equivalents

The following subsections list the parameter types that are available for library procedures in each of the various programming languages. For each parameter type, the equivalent ALGOL parameter type is listed. You can also use this information to deduce which parameter types in two non-ALGOL languages are equivalent. In general, two parameters can match only if they are equivalent to the same ALGOL parameter type.

Example of Using the Tables

For example, you will find that an int parameter in C is equivalent to an ALGOL integer variable, and that a BINARY, level 77 1-11 digits parameter in COBOL74 is also equivalent to an ALGOL integer variable. It follows that the C parameter type can also match the COBOL74 parameter type.

Matches between Different ALGOL Types

The system permits one exception to the rule that parameters must match the same ALGOL type. A call-by-value INTEGER parameter of an imported procedure can match a REAL parameter of an exported procedure.