Technical data
Fortran/Pascal Interface
53
Example
The following examples show Fortran and Pascal routines that access
common blocks of data.
Pascal
VAR
A_: RECORD
I : INTEGER;
R : REAL;
END;
PROCEDURE SAM_;
EXTERNAL;
PROGRAM S;
BEGIN
A_.I := 4;
A_.R := 5.3;
SAM_;
END.
Fortran
SUBROUTINE SAM()
COMMON /A/I,R
WRITE (6,10) i,r
10 FORMAT (1x,I5,F5.2)
RETURN
END
The Fortran routine prints out 4 and 5.30.










