Technical data

Fortran/Pascal Interface
47
Invocation
If you have alternate return labels, you can invoke a Fortran subprogram as
if it were an integer-valued function whose value species which alternate
return to use. Alternate return arguments (statement labels) are not passed
to the function but cause an indexed branch in the calling subprogram. If the
subprogram is not a function and has no entry points with alternate return
arguments, the returned value is undened.
The Fortran statement
call nret (*1,*2,*3)
is treated exactly as if it were the computed goto
goto (1,2,3), nret()
A Pascal function that calls a Fortran subroutine can usually ignore the
return value. Table 3-5 shows equivalent function declarations in Pascal and
Fortran.
Fortran has a built-in data type COMPLEX that does not exist in Pascal.
Therefore, there is no compatible way of returning these values from Pascal.
A character-valued Fortran function is equivalent to a Pascal language
routine with two initial extra arguments: a data address and a length.
Table 3-5 Function Declarations
Pascal Fortran
function dfort_(): double;
function rfort_(): real;
function ifort_(): integer;
double precision function dfort()
real function rfort()
integer function ifort()