TAL Programmer's Guide

Compiling With Source Directives
Compiling Programs
096254 Tandem Computers Incorporated 14–11
Including System
Procedure Declarations
You can use SOURCE directives to read in external declarations of system procedures
from the EXTDECS files. In these files, the procedure name and the corresponding
section name are the same. EXTDECS0 contains the current release version of system
procedures, for example, the D20 version.
In the following D-series example, a SOURCE directive specifies the current version of
system procedures. A NOLIST directive suppresses the listings for the system
procedures. Place NOLIST and SOURCE on the same line, because the line containing
the NOLIST directive is not suppressed:
?PUSHLIST, NOLIST, SOURCE $SYSTEM.SYSTEM.EXTDECS0 (
? PROCESS_DEBUG_, PROCESS_STOP_)
!Suppress listings; read in external declarations of
! current system procedures
?POPLIST
A D-series procedure in the same source file can then call the procedures listed in the
preceding SOURCE directive:
PROC a MAIN;
BEGIN
INT x, y, z, error;
!Code for manipulating x, y, and z
If x = 5 THEN CALL PROCESS_STOP_;
CALL PROCESS_DEBUG_; !Call procedures listed
END; ! in SOURCE directive
To convert the two preceding examples to C-series examples, change the procedure
names PROCESS_STOP_ and PROCESS_DEBUG_ to STOP and DEBUG, respectively.