The FORTRAN–Pascal Interface
167
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.
Содержание SunSoft Pascal 4.0
Страница 14: ...xiv Pascal 4 0 User s Guide ...
Страница 16: ...xvi Pascal 4 0 User s Guide ...
Страница 30: ...6 Pascal 4 0 User s Guide 1 ...
Страница 160: ...136 Pascal 4 0 User s Guide 6 ...
Страница 268: ...244 Pascal 4 0 User s Guide 11 ...
Страница 320: ...296 Pascal 4 0 User s Guide B ...
Страница 331: ...Index 307 ...
Страница 333: ......