FORTRAN Reference Manual
Compiler Directives
FORTRAN Reference Manual—528615-001
10-12
CONSULT Compiler Directive
•
If you specify COMPACT, BINSERV checks each succeeding code-space block to 
determine whether it will fit into either current gap. When a code-space block that 
fits in a gap is found, BINSERV allocates it in the gap, thereby compressing both 
the target file and the object program. Figure 10-1 illustrates this process.
Example
?COMPACT
CONSULT Compiler Directive
The CONSULT directive declares external procedures.
When you declare a procedure name in a CONSULT directive, FORTRAN checks the 
procedure definition and generates an appropriate calling sequence for calls to the 
procedure that occur in the compilation.
Figure 10-1. The Effect of the COMPACT Directive
CONSULT 
Program A Program B Program EProgram DProgram C
10K words 12K words 16K words 4K words 5K words
! No block exceeds 32K words
! No block spans a 32K boundary
Bound with NOCOMPACT, the code requires 58K words:
BBBBBBBBBBBBAAAAAAAAAA ^^^^^^^^^
^
CCCCCCCCCCCCCCCC DDDD EEEEE
Bound with COMPACT, BINSERV rearranges the blocks to fit in 48K words:
10 22 32 48 52 58
Note: Each character above represents 1K words.
CCCCCCCCCCCCCCCC
^
EEEEEDDDD
BBBBBBBBBBBB
AAAAAAAAAA
10
22 26 31 32 48
VST1001.vsd
The compiler presents code-space blocks to BINDER in the following order:
consult item–
consult item  ,  consult item–[]. . . –()










