FORTRAN Reference Manual
Compiler Directives
FORTRAN Reference Manual—528615-001
10-28
GUARDIAN Compiler Directive
GUARDIAN Compiler Directive
The GUARDIAN directive specifies the names of Guardian system procedures and of
FORTRAN utility routines that your program calls.
If you specify a procedure name in a GUARDIAN directive, FORTRAN checks the
procedure definition and generates an appropriate TAL calling sequence for calls your
program makes to the procedure.
proc-name
is the name of a Guardian procedure or a FORTRAN utility routine.
If you specify a proc-name that is not the name of a Guardian procedure or a
FORTRAN utility routine, FORTRAN issues a warning message and generates the
normal FORTRAN calling sequence for calls to the procedure.
Considerations
•
Use of the GUARDIAN directive
You must include the GUARDIAN directive that declares a Guardian procedure or
a utility routine before the first FORTRAN statement which calls that procedure.
If you compile any portion of a program with the LARGECOMMON,
EXTENDEDREF, or LARGEDATA directives, you must use the GUARDIAN
directive to declare all Guardian procedures and FORTRAN utility routines that you
call from the program.
proc-name has the scope of an executable program. If you attempt to redefine it,
FORTRAN issues an error message.
•
To use the most recent version of a Guardian procedure, use the CONSULT
directive instead of the GUARDIAN directive, and specify
$SYSTEM.SYSTEM.COBOLEX0.
•
Declaring Typed Procedures (functions)
If you use the GUARDIAN directive to declare a Guardian routine or a utility routine
that can be called as a function, the FORTRAN data type returned by the function
corresponds to the data type specified by the TAL routine. FORTRAN’s normal
implicit typing rules do not apply and you do not need to include an explicit type
declaration for the function.
•
Using Typed Procedures (Functions)
Unlike TAL, which allows a CALL statement to invoke typed procedures, and
generates object code that discards the value returned by the typed procedure,
GUARDIAN
proc name–
proc name , proc name–[]. . .–()










