TAL Reference Manual
Statements
TAL Reference Manual—526371-001
12-2
Compound Statements
•
A semicolon must not immediately precede an ELSE or UNTIL keyword.
•
A semicolon alone in place of a statement creates a null statement. The compiler
generates no code for null statements. You can use a null statement wherever you
can use a statement except immediately before an ELSE or UNTIL keyword.
Compound Statements
A compound statement is a BEGIN-END construct 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.
Usage Considerations
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.
Examples of Compound Statements
1. This example shows a null compound statement. One use is in a CASE statement
when a case has no action
BEGIN
END;
BEGIN END
statement
;
;
VST1201.vsd