PS TEXT FORMAT Reference Manual

Introduction to TFORM
11387 Tandem Computers Incorporated 3–7
How to Use ASSIGN
You use the ASSIGN command to store either a numeric or string value in a
variable that you name. When you use the variable name later in your
document, TFORM inserts the value of the variable where you call it.
Variables you create with the ASSIGN command can be easily updated.
For example, say your document is draft version 3.1, and you refer to this
version number several times in your text. To make future updating easier,
simply put this statement at the beginning of your file
\ASSIGN
version
_
num
"3.1"
In the following examples, when you refer to the version number in your
text, use the indirection escape sequence to reference your variable
This document, which is version \(
version
_
num
\), is designed ...
Currently, the version \(
version
_
num
\) text documents the ...
Note The variable is enclosed in an indirection escape sequence. Refer to Section 4 for more
information.
If the version number changes, you simply redefine the
version
_
num
variable by changing the ASSIGN command. TFORM changes all
references to
version
_
num
when the text is later printed.
For example, you can also assign a value to a variable, then pass that value
on to a new variable
\ASSIGN A 2+2
\ASSIGN Z A
first gives the variable A the value of 4. The next statement passes the value
of A on to the variable Z. Now, Z assumes the value of 4.