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.
Summary of Contents for SunSoft Pascal 4.0
Page 14: ...xiv Pascal 4 0 User s Guide ...
Page 16: ...xvi Pascal 4 0 User s Guide ...
Page 30: ...6 Pascal 4 0 User s Guide 1 ...
Page 160: ...136 Pascal 4 0 User s Guide 6 ...
Page 268: ...244 Pascal 4 0 User s Guide 11 ...
Page 320: ...296 Pascal 4 0 User s Guide B ...
Page 331: ...Index 307 ...
Page 333: ......