TAL Programmer's Guide

1 Introducing TAL
096254 Tandem Computers Incorporated 1–1
The Transaction Application Language (TAL) is a high-level, block-structured
language that works efficiently with the system hardware to provide optimal object
program performance. The TAL compiler compiles TAL source programs into
executable object programs. The compiler and the object programs it generates
execute under control of the Tandem NonStop Kernel.
Using TAL You use TAL most often for writing systems software or transaction-oriented
applications where optimal performance has high priority. You can, for example, use
TAL to write the kinds of software listed in Table 1-1.
Table 1-1. Uses of TAL
Kind of
Software Examples
Systems
software
Operating system components
Compilers and interpreters
Command interpreters
Special subsystems
Special routines that support data communication activities
Applications
software
Server processes used with Tandem data management software
Conversion routines that allow data transfer between Tandem software and other
applications
Procedures that are callable from programs written in other languages
Applications that require optimal performance
Many Tandem software products are written in TAL.
Major Features The major features of TAL are:
Procedures—Each program contains one or more procedures. A procedure is a
discrete sequence of declarations and statements that performs a specific task. A
procedure is callable from anywhere in the program.
Each procedure executes in its own environment and can contain local data that is
not affected by the actions of other procedures. When a procedure calls another
procedure, the operating system saves the caller’s environment and restores the
environment when the called procedure returns control to the caller.
Subprocedures—A procedure can contain subprocedures, callable only from
within the same procedure. When a subprocedure calls another subprocedure, the
caller’s environment remains in place. The operating system saves the location in
the caller to which control is to return when the called subprocedure terminates.
Private data area—Each activation of a procedure or subprocedure has its own
data area. When each activation terminates, it relinquishes its private data area,
thereby keeping the amount of memory used by a program to a minimum.