Multidimensional Arrays; General Parameter-Passing In Fortran And Pascal - Sun Microsystems SunSoft Pascal 4.0 User Manual

Hewlett-packard user guide printer printer
Table of Contents

Advertisement

General Parameter-Passing in FORTRAN and Pascal

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.
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
8
167

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SunSoft Pascal 4.0 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents