pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

Compound Statements
A compound statement is a BEGIN-END block that groups statements to form a single logical
statement.
BEGIN
indicates the start of the compound statement.
statement
is a statement described in this section.
; (semicolon)
is a statement separator that is required between successive statements. A semicolon before
an END that terminates a compound statement is optional and represents a null statement.
END
indicates the end of the compound statement.
You can use compound statements anywhere you can use a single statement. You can nest them
to any level in statements such as IF, DO, FOR, WHILE, or CASE.
Example 140 Null Compound Statement
BEGIN
END;
Example 141 Compound Statement
BEGIN
a := b + c;
d := %B101;
f := d - e;
END;
ASSERT
The ASSERT statement conditionally calls the procedure specified in the active directive ASSERTION
(page 495).
assert-level
is an integer in the range 0 through 32,767.
If assert-level is greater than or equal to the assertion-level specified in the active
ASSERTION directive and if condition is true, the program calls the procedure specified
in the active ASSERTION directive.
condition
is a conditional expression (see Conditional Expressions (page 81)).
To use the ASSERT statement and the ASSERTION directive together for debugging or error-handling:
200 Statements