TAL Programmer's Guide
Major Features
Introducing TAL
1–2 096254 Tandem Computers Incorporated
Recursion—Because each activation of a procedure or subprocedure has its own
data area, a procedure or subprocedure can call itself or can call other procedures
that in turn calls the original procedure.
Parameters—A procedure or subprocedure can have optional or required
parameters. The same procedure or subprocedure can process different sets of
variables sent by different calls to it.
Data types—You can declare and reference the following types of data:
Data Type Description
STRING 8-bit integer byte
INT, INT(16) 16-bit integer word
INT(32) 32-bit integer doubleword
FIXED, INT(64) 64-bit fixed-point quadrupleword
REAL, REAL(32) 32-bit floating-point doubleword
REAL(64) 64-bit floating-point quadrupleword
UNSIGNED(
n
)
n
-bit field, where 1 <=
n
<= 31
Data sets—You can declare and use sets of related variables such as arrays and
structures (records).
Pointers—You can declare pointers (variables that can contain byte addresses or
word addresses) and use them to access locations throughout memory. You can
store addresses in them when you declare them or later in your program.
Data operations—You can copy a contiguous group of words or bytes and
compare one group with another. You can scan a series of bytes for the first byte
that matches (or fails to match) a given character.
Bit operations—You can perform bit deposits, bit extractions, and bit shifts.
Standard functions—You can use built-in functions, for example, to convert data
types and addresses, test for an ASCII character, or determine the length, offset,
type, or number of occurrences of a variable.
Compiler directives—You can use directives to control a compilation. You can, for
example, check the syntax in your source code or control the content of compiler
listings.
Modular programming—You can divide a large program into modules, compile
them separately, and then bind the resulting object files into a new object file.
Mixed-language programming—You can use NAME and BLOCK declarations,
procedure declaration options—such as public name, language attribute, and
parameter pairs—and compiler directives in support of mixed-language
programming.
NonStop SQL features—You can use compiler directives to prepare a program in
which you want to embed SQL statements.