TAL Programmer's Guide

Compiling With Search Lists
Compiling Programs
14–12 096254 Tandem Computers Incorporated
Compiling With
Search Lists
You can share data and procedures between object files by specifying search lists of
object file names for resolving unsatisfied external references and validating parameter
lists at the end of the compilation session.
To create search lists of object files, use the SEARCH directive:
?SEARCH (file1, file2, file3)
Creating the
Master Search List
The compiler sends the search list from each SEARCH directive to BINSERV, the
compile-time binder process. BINSERV appends the file names, in the order specified,
to the master search list for the current source file.
For example, if you specify the following SEARCH directives, the master search list is
in the order FILE2, FILE1, FILE3, and FILE4:
?SEARCH (file2, file1)
!Lots of code
?SEARCH (file3, file4)
Clearing the
Master Search List
You can clear the current master search list at any point in the source file. BINSERV
uses only the files that remain on the search list at the end of compilation to resolve
external references.
To clear the master search list at any point, specify a SEARCH directive with no file
names. For example, suppose you specify two search lists that comprise the master
search list. You can then clear the master search list as follows:
?SEARCH (file1, file2) !Specify search list
?SEARCH (file3) !Add FILE3 to search list
?SEARCH !Clear master search list
! of FILE1, FILE2, FILE3
!Lots of code
?SEARCH (file4, file5) !Specify new search list;
! master search list is
! now FILE4 and FILE5