pTAL Reference Manual (H06.08+)
HP pTAL Reference Manual—523746-006
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.
In addition to the statements summarized in Table 12-1 on page 12-1, this section
describes:
•
Using Semicolons in Statements on page 12-2
•
Compound Statements on page 12-2
Table 12-1. Summary of Statements
Category Statement Operation
Program
control
ASSERT
Conditionally calls a procedure
CALL
Calls a procedure or subprocedure
CASE
Selects a set of statements based on a selector
value
DO-UNTIL
A post-test loop that repeatedly executes a
statement until a specified condition becomes true
FOR
Executes a pretest loop n times
GOTO
Unconditionally branches to a label within a
procedure or subprocedure
IF
Conditionally selects one of two possible
statements
RETURN
Returns from a procedure or a subprocedure to
the caller; returns a value from a function; returns
a condition code value
WHILE
Executes a pretest loop while a condition is true
Data
transfer
Assignment
Stores a value in a variable
Bit-Deposit Assignment
Stores a value in a bit or in a group of sequential
bits
Data scan SCAN and RSCAN
Scan data for a test character, left-to-right and
right-to-left, respectively
Data
allocation
DROP
Removes either a label (from the symbol table) or
a temporary variable that was created by a USE
statement
USE
Creates a temporary variable










