TAL Reference Manual

TAL Reference Manual526371-001
12-1
12 Statements
Statements—also known as executable statements—perform operations in a program.
They can modify the program’s data or control the program’s flow. Table 12-1
summarizes statements.
Using Semicolons
You use semicolons with statements as follows:
A semicolon is required between successive statements.
A semicolon is optional before an END keyword that terminates a compound
statement.
Table 12-1. Summary of Statements
Category Statement Operation
Program Control ASSERT
CALL
CASE
DO
FOR
GOTO
IF
RETURN
WHILE
Conditionally calls an error-handling procedure
Calls a procedure or subprocedure
Selects a set of statements based on a selector
value
Executes a posttest loop until a condition is true
Executes a pretest loop n times
Unconditionally branches to a label within a
procedure or subprocedure
Conditionally selects one of two possible
statements
Returns from a procedure or a subprocedure to
the caller; returns a value from a function, and
can also return a condition code value
Executes a pretest loop while a condition is true
Data Transfer Assignment
MOVE
STACK *
STORE *
Stores a value in a variable
Copies a contiguous group of items from one
location to another
Loads a value onto the register stack
Stores a register stack value in a variable
Data Scan RSCAN
SCAN
Scans data, right to left, for a test character
Scans data, left to right, for a test character
Machine
Instruction
CODE *
DROP
USE
Specifies machine codes or constants for
inclusion in the object code
Frees an index register or removes a label from
the symbol table
Reserves an index register
* Not portable to future software systems.