FORTRAN Reference Manual
Mixed-Language Programming
FORTRAN Reference Manual—528615-001
13-8
The FORTRAN Calling Sequence
When FORTRAN translates the CALL statement
CALL bakerstreet (holmes, doyle)
it generates object code to call a procedure named BAKERSTREET which, if it were 
written in FORTRAN, would be a subroutine subprogram having formal parameters 
with types as shown. You could write the called routine in TAL as follows:
PROC bakerstreet (holmes, doyle);
INT .holmes;
REAL .doyle;
BEGIN
...
END;
If you specify the FORTRAN compiler directive EXTENDEDREF, you would code the 
TAL routine as follows:
PROC bakerstreet (holmes, doyle);
INT .EXT holmes;
REAL .EXT doyle;
BEGIN
...
END;
The calling sequence of a FORTRAN subroutine is the same as that of a TAL 
procedure with all parameters passed by reference. The data types of the caller’s 
actual arguments must correspond to the data types of the called routine’s dummy 
arguments. (For information on corresponding data types between different 
programming languages, see Appendix D, Data Type Correspondence and Return 
Value Sizes.) Reference parameters have word or doubleword addresses, depending 
on the value you specify for the EXTENDEDREF directive.
Similarly, FORTRAN translates the function reference:
diary = watson (holmes, doyle)
by generating object code to call a function procedure named WATSON which, if it 
were written in FORTRAN, would be a function subprogram having formal parameters 










