FORTRAN Reference Manual
Mixed-Language Programming
FORTRAN Reference Manual—528615-001
13-18
Calling TAL Subprograms From FORTRAN
If you compile your FORTRAN modules with ENV OLD in effect and your TAL modules 
with either ENV OLD or ENV NEUTRAL in effect, routines written in both languages 
can open the same file but each open is independent of all other opens.
You can share access to the same file open by passing the file number between 
routines that need to access the same file using the same file open. 
If you compile your FORTRAN modules with ENV COMMON and your TAL modules 
with either ENV COMMON or ENV NEUTRAL, your FORTRAN and TAL routines can 
share access to the same Guardian file open for standard input and for standard 
output—the files associated with unit 5 and unit 6, respectively. To share standard input 
or standard output, a routine in each language must explicitly open the file.
The TAL procedures can use the Guardian file system, the Sequential Input/Output 
(SIO) package of GPLIB, or embedded NonStop SQL statements without interfering 
with FORTRAN I/O statements in the same program.
For more information about shared files, see the OPEN Statement on page 7-70.
•
If the FORTRAN program does not declare the TAL procedure with a GUARDIAN 
or CONSULT directive:
°
If the FORTRAN program is compiled with any EXTENDEDREF, 
LARGECOMMON, or LARGEDATA directives, the called TAL procedure must 
declare all reference parameters (if any) with .EXT, so the TAL procedure will 
expect the doubleword argument addresses that FORTRAN provides.
°
Otherwise, the called TAL procedure must declare all reference parameters (if 
any) without .EXT, so the TAL procedure will expect the word-address 
arguments that FORTRAN provides in this case.
•
For a TAL type UNSIGNED(8) formal parameter passed by value, FORTRAN 
allows a CHARACTER*1 expression or an integer constant with value in the range 
0 through 255 as the argument. 
•
For a TAL type UNSIGNED(16) formal parameter passed by value, FORTRAN 
allows an integer constant with value in the range 0 through 65,535 as the 
argument.
•
For a TAL type UNSIGNED(31) formal parameter passed by value, FORTRAN 
allows an integer constant with value in the range 0 through 3,147,483,647 as the 
argument.
•
If a called TAL procedure has parameter-pair formal parameters, FORTRAN 
generates an address-length pair actual parameter on the stack according to the 










