TAL Programmer's Guide

Declaring Procedures
Structuring Programs
096254 Tandem Computers Incorporated 3–9
Table 3-2 lists the statements you can include in a TAL program. (Statement names in
uppercase reflect a keyword. The assignment and move statements have no keywords
in them; their names are in lowercase.)
Table 3-2. TAL Statements
Statement Operation
ASSERT Conditionally calls an error-handling procedure
Assignment Stores a value in a variable
CALL Invokes a procedure or a subprocedure
CASE Selects a set of statements based on a selector value
CODE
*
Specifies machine codes or constants for inclusion in the object code
DO Executes a posttest loop until a true condition occurs
DROP Frees an index register or removes a label from the symbol table
FOR Executes a pretest loop for n times
GOTO Unconditionally branches to a label within a procedure or subprocedure
IF Conditionally selects one of two possible statements
Move Copies a contiguous group of items from one location to another
RETURN Returns from a procedure or a subprocedure to the caller; returns a value from a
function. As of the D20 release, it also can return a condition code value
RSCAN Scans a sequence of bytes, right to left, for a test character
SCAN Scans a sequence of bytes, left to right, for a test character
STACK
*
Loads a value onto the register stack
STORE
*
Stores a register stack value in a variable
USE Reserves an index register
WHILE Executes a pretest loop while a condition is true
*
Not portable to future software platforms.
Local statements can refer to:
Global identifiers, including procedure identifiers, anywhere in the program
Local identifiers, including subprocedure identifiers, in the encompassing
procedure