Technical data
52
Chapter 3: Fortran Program Interfaces
Pascal
TYPE STRING = ARRAY[1..10] OF CHAR;
PROCEDURE S_( VAR A: STRING; I: INTEGER); EXTERNAL;
/* Note the underbar */
PROGRAM TEST;
VAR
R: STRING;
BEGIN
R:= “0123456789”;
S_(R,10);
END.
Fortran
SUBROUTING S(C)
CHARACTER*10 C
WRITE (6,10) C
10 FORMAT (6,10) C
RETURN
END
Accessing Common Blocks of Data
The following rules apply to accessing common blocks of data:
• Fortran common blocks must be declared by common statements; Pascal
can use any global variable. Note that the common block name in
Pascal (sam_) must end with an underscore.
• Data types in the Fortran and Pascal programs must match unless you
want implicit equivalencing. If so, adhere to the alignment restrictions
for the data types described in Chapter 2, “Storage Mapping.”
• If the same common block is of unequal length, the largest size is used
to allocate space.
• Unnamed common blocks are given the name _BLNK_, where _ is the
underscore character.










