FORTRAN Reference Manual
Compiler Directives
FORTRAN Reference Manual—528615-001
10-13
CONSULT Compiler Directive
consult-item
is a Guardian file name or DEFINE name known at compile time, optionally
followed by the name of one or more procedures contained in the referenced file.
The procedure names, if present, are separated by commas and contained in
parentheses. The syntax of a consult-item is:
[( proc-name [, proc-name ]... )]
Compile-time defaults are supplied for any missing qualifiers. Each
consult-item must be an object file created by the Binder. It must contain a
Binder region. The procedure bodies in this file can be empty because FORTRAN
needs only the procedure names and attributes, along with the attributes of their
formal parameters. For more details, see Considerations. For information on the
Binder region, see the Binder Manual.
Considerations
•
The CONSULT directive can appear on the FORTRAN command line following the
semicolon after the object file name, or anywhere in the source input file. A
compilation can have any number of CONSULT directives.
•
If the CONSULT directive names a file without listing procedure names, the
FORTRAN compiler looks up all the procedures in that file, and records their
descriptions. If the CONSULT directive has a list of procedure names, the compiler
looks up only those procedures and records their descriptions.
•
If a procedure is named in the directive but not found in the file, the compiler issues
a warning message and ignores the procedure, but continues processing the
remainder of the directive.
•
If two or more procedures with the same name are found (in different files), the
compiler uses the first one and ignores the others. The compiler does not report a
warning.
•
FORTRAN ignores a procedure in a file specified in a CONSULT directive if the
procedure:
°
Is a main program.
°
Has a name that is not a legal FORTRAN name.
°
Is a C procedure with lowercase letters in its name.
°
Is a C procedure with a variable number of parameters.
°
Is a C procedure compiled with the OLDCALLS pragma.
°
Was compiled from a source language other than C, COBOL85, FORTRAN,
Pascal, or TAL.
file name–
define name–










