FORTRAN Reference Manual

Mixed-Language Programming
FORTRAN Reference Manual528615-001
13-26
Using ENV COMMON
If you are writing a TAL program and you want to use any of the FORTRAN intrinsic
functions, you can use TAL compiler directives to SOURCE in the FORTDECS file and
SEARCH the FORTLIB file.
The FORTDECS file contains a SECTION for each procedure, so that you can use it in
much the same way as the $SYSTEM.SYSTEM.EXTDECS file. The name of each
procedure, and of its SECTION, is the FORTRAN intrinsic function name, with a
circumflex character (^) appended, for word addressing of parameters. There is also a
second version of each procedure, named by appending ^^EXT to the FORTRAN
intrinsic function name, for doubleword extended addressing of parameters. For
example, to use the SQRT function:
?SOURCE $SYSTEM.SYSTEM.FORTDECS (SQRT^)
?SEARCH $SYSTEM.SYSTEM.FORTLIB
Those intrinsic functions that perform validity checks on their arguments (see Intrinsic
Errors on page G-3) contain references to the LIB^ERROR procedure, which resides in
the same FORTLIB file.LIB^ERROR in turn calls proc FLIB^MESSAGE which normally
resides in the system library.
Since TAL lacks a COMPLEX data type, COMPLEX values are declared as REAL(64)
in the intrinsic function procedures. A COMPLEX data value is actually represented as
a pair of REAL(32) values: the real part followed by the imaginary part.
Using ENV COMMON
The ENV compiler directive enables you to specify whether you want your FORTRAN
program to use routines in the C-series or in the D-series FORTRAN run-time library.
If you specify ENV OLD or do not specify an ENV directive, your program uses
routines in the C-series FORTRAN run-time library and cannot share files or other
resources with other routines in your process. You do not need to read further in this
subsection.
If you specify an ENV COMMON compiler directive, your program uses the routines in
the D-series FORTRAN run-time library. The D-series FORTRAN run-time library
enhances your program’s ability to share resources by using routines in the Common
Run-Time Environment (CRE). The FORTRAN run-time library depends on CRE
routines to:
Share access to the files standard input and standard output. Unit 5 references
standard input. Unit 6 references standard output. If opened for shared access, the
FORTRAN run-time library calls CRE routines whenever your program performs
I/O on unit 5 or unit 6. For more information about shared access to standard input
and standard output, see the OPEN Statement on page 7-70.
Manage your process’s backup process if your program runs as a NonStop
process.
Display diagnostic messages on the standard log file.