8

Pascal Set Types

In Pascal, a set type is implemented as a bit vector, which is similar to a FORTRAN 16-bit word. Direct access to individual elements of a set is highly machine-dependent and should be avoided.

Multidimensional Arrays

Pascal multidimension arrays are incompatible with FORTRAN multi- dimension arrays. Since Pascal arrays use row-major indexing, and FORTRAN arrays use column-major indexing, an array passed in either direction appears to be transposed.

General Parameter-Passing in FORTRAN and Pascal

A few general rules apply to passing parameters:

By default, FORTRAN passes all parameters by reference.

In FORTRAN, if you want to pass anything by value, then you must explicitly use the nonstandard function %VAL().

Pascal passes all parameters by value unless you explicitly state that they are var, out, or in out parameters, in which case they are passed by reference.

The routine options nonpascal, extern fortran, and external fortran pass by reference.

The FORTRAN–Pascal Interface

167