Incompatibilities – HP SunSoft Pascal 4.0 User Manual
Page 190

166
Pascal 4.0 User’s Guide
8
Character Strings
There are some precautions to take with character strings regarding the null
byte, passing by value, and static storage:
•
Set the byte count to zero before calling Pascal with a null varying string,
because that is what Pascal assumes about such strings.
•
Pass a structure consisting of a 4-byte integer and an array of characters
from FORTRAN to a Pascal procedure, expecting a
var
parameter that is a
variable-length string.
•
Pass by reference by making the strings
var
,
in
,
out
, or
in out
parameters.
•
Set the string to constant because FORTRAN and Pascal each guarantees the
null byte only if the string is a constant. Neither of them relies on the null
byte, which is not required by the ISO Pascal Standard.
Array Indexes
The Pascal and FORTRAN array indexes can start at any integer; be sure they
match.
Incompatibilities
There are several incompatibilities between Pascal and FORTRAN variant
records, enumerated types, and set types.
Variant Records
In general, Pascal variant records require adjustment of alignment to match
with FORTRAN unions and structures.
Enumerated Types
Pascal enumerated types have no comparable type in FORTRAN.