PS TEXT FORMAT Reference Manual

Introduction to TFORM
11387 Tandem Computers Incorporated 3–57
If the expression is false, TFORM bypasses the lines that follow; it does,
however, look to see if any of them are the corresponding ORIF or ELSE
command that provides an alternate course of action.
If TFORM finds an ORIF command, and the preceding IF or ORIF was false,
it evaluates that command’s expression to see if it should take an alternate
path of action; it takes that path or bypasses it, depending on the
expression’s value, just as with the initial IF command. Multiple ORIF
commands are allowed, so that one IF construct can have multiple paths of
action.
If TFORM finds an ELSE command, and all preceding possible IF and ORIF
conditions were false, it processes the lines following the ELSE until it
reaches the corresponding ENDIF command. An ELSE statement is
associated with the most recent IF command that hasn’t been terminated by
an ENDIF command.
Tips
You can’t abbreviate IF, ORIF, ELSE, or ENDIF commands or combine
them with other commands; each must be on a line by itself.
The lines following an IF or ORIF command can contain an entire
secondary IF construct that is conditional on the IF (ORIF) expression
being true. Similarly, a set of lines following an ELSE command can
contain a nested IF construct predicated on the original IF (and all
associated ORIF) conditions being false.
All the commands that make up an IF construct must be in a single
input file. You should, therefore, check that any IF construct contained
in a sourced-in file is both begun and ended in that file.
Although the trigger character that identifies a TFORM command must
be placed in the first position of an input line, the remainder of the line
can be indented any number of characters. You may find that such
indentation is useful in providing good readability of nested IF
constructs.