PS TEXT FORMAT Reference Manual
Introduction to TFORM
3–56 11387 Tandem Computers Incorporated
Example
\IF title="Ms."
Career women such as yourself recognize the value
of a dollar,
\ORIF title="Dr."
Professional people such as yourself are aware of
the money situation,
\ELSE
\ IF title="Mr."
\ ASSIGN people "men"
\ ORIF title="Mrs."
\ ASSIGN people "women"
\ ELSE
\ ASSIGN people "folk"
\ ENDIF
Hard-working \(people\) like you know what it takes
to make a buck,
\ENDIF
so we're sure you'll be interested in hearing about
our new investment plan.
Use of the “\(
exp
\)” indirection escape sequence is described in more
detail in Section 4.
How to Use the IF Construct
When TFORM encounters an IF command, it evaluates the expression
contained in the command to see if it has a true value. (Boolean expressions
are usually used in this case, but you can use a numeric expression if you
wish; TFORM treats any zero value as “false,” any nonzero value as “true.")
Expressions are described in detail in Section 5.
If the expression has a true value, TFORM processes the lines that follow
the IF command, formatting any text and executing any commands (but not
ORIF or ELSE commands Once TFORM discovers a true IF condition, it
takes that path of action and disregards all subsequent choices) until it
reaches the associated ENDIF command.