FORTRAN Reference Manual

Program Compilation
FORTRAN Reference Manual528615-001
9-31
Using the SEARCH Directive—Sample Program 2
4. Based on the output of Step 3, alter the source code for the main routine.
Recompile the main routine, and delete the old MAIN disk file. (The new MAIN^
object code will also be in a file named MAIN.)
5. Use the interactive Binder to build a new program file. Input to this step is the
program file MAKEONE and the new MAIN file. Since the command to build the
new program file specifies a different file name (MAKETWO), Binder does not
purge MAKEONE. MAKETWO contains copies of PRINTARRAY and
TRANSPOSE from MAKEONE along with the new MAIN^ routine from MAIN.
6. Code and compile the actual transpose subroutine, TRANSPOSE. The disk file is
named XPOSE.
7. Use the interactive Binder to build the final program file, LASTMAKE, by adding the
actual TRANSPOSE code and deleting the dummy subroutine.
Using the SEARCH Directive—Sample Program 2
This program is a pen-primer routine for use with a commercially available plotter. The
plotter source code includes a file of subroutines (not shown here). The pen primer
uses a subset of the subroutines. Using the SEARCH directive, compilation results in
the inclusion of only those code and data blocks that are needed to satisfy external
references. You do not need to use a SOURCE directive to recompile subroutine
source code.