PS TEXT FORMAT Reference Manual

Information Management Technology Library
PS TEXT
FORMAT
Reference
Manual
™
Abstract
Part Number
This manual explains in detail the commands and advanced features of the PS TEXT
FORMAT formatter product.
11387
Tandem Computers Incorporated
Document History
Edition
Part Number Product Version
First Edition
Second Edition
Update 1
Third Edition
82384 A00
82478 A00
82243
11387
TFORM B20
TFORM B30
TFORM C00
TFORM C10
OS Version
GUARDIAN 90 B20
GUARDIAN 90 B30
GUARDIAN 90 C00
GUARDIAN 90 C10
Date
October 1985
April 1986
November 1987
March 1989
New editions incorporate any updates issued since the previous edition.
Copyright
All rights reserved. No part of this document may be reproduced in any form, including
photocopying or translation to another language, without the prior written consent of Tandem
Computers Incorporated. Copyright  1989 Tandem Computers Incorporated.
Contents
ix
xv
Section 1
Introduction to TFORM
1-1
1-1
1-2
1-2
1-4
1-5
1-5
1-8
1-8
Section 2
Preface
Notation Conventions
An Overview of TFORM
Creating a Document With TFORM
Constructing TFORM commands
Parts of a TFORM command
Units
Running TFORM
Using RUN
Printing Your Output
Default Formatting
Overview of TFORM Capabilities
2-1
2-2
2-2
2-4
2-5
2-6
2-8
2-9
2-10
2-10
2-12
2-13
2-15
2-15
2-18
2-21
2-23
2-24
2-25
2-26
2-26
Command Overview
Basic Formatting With TFORM
Indicating Form Length and Width
Setting Margins
Setting Headers
Setting Footers
Joining Text
Justifying Text
Centering Text
Indenting Text
Leaving Blank Space in Text
Handling Page Breaks
Creating Special Effects With TFORM
Sentence and Paragraph Spacing
Using Levels Headings in Text
Creating Lists
Creating Boxes
Using Tabs
Controlling Hyphenation
Using Sequential Line Numbering
Printing Marks in the Margin
11387 Tandem Computers Incorporated
iii
Contents
2-27
2-28
2-30
2-30
2-30
2-31
2-31
2-31
2-32
Section 3
TFORM Commands
3-1
3-1
3-3
3-4
3-5
3-6
3-6
3-9
3-11
3-13
3-16
3-18
3-21
3-26
3-29
3-30
3-31
3-37
3-41
3-46
3-50
3-55
3-58
3-62
3-64
iv
Customizing Your Text
Controlling the Printed Output
Advanced Features of TFORM
Sourcing in Other Files
Using Auxiliary Files
Conditional Processing
Repetitive Processing
Generating Form Letters
Creating Your Own Macros and Functions
Command Overview
Formatting Commands
Control Commands
Programmatic Commands
Standard Macro Summary
Command Descriptions
Assign
BREAK
CENTER
CHANGES
COMMENT
CONTENTS
DEFINE
ENV
ERROR
EXIT
FILE
FOOTER
FUNCTION
HEADER
HELP
IF
INDENT
KEEP
LETTER
11387 Tandem Computers Incorporated
Contents
3-71
3-83
3-94
3-98
3-102
3-103
3-105
3-108
3-118
3-131
3-135
3-137
3-151
3-153
3-154
3-156
3-161
Section 4
LEVEL
LIST
LOOP
MACRO
Macro Invocation Command
NEW
PAGE
PRINT
SET
SOURCE
SPACE
STYLE
Temporary Indentation (TI)
TIME
TITLE
TODAY
VERBATIM
Escape Sequences
4-1
4-2
4-2
4-2
4-3
4-5
4-5
4-6
4-6
4-7
4-7
4-8
4-8
4-9
4-11
Metacharacters
Comment Metacharacter
Discretionary Hyphen
Tabulation Symbol
Backspace Symbol
Rendition Controls
Boldface Type
Changing Fonts
Overstruck Type
Shadow Type
Subscripts
Superscripts
Underlining
Indirection Escape Sequence
Double Indirection
11387 Tandem Computers Incorporated
v
Contents
Section 5
Expressions
5-1
5-2
5-3
5-3
5-3
5-5
5-5
5-13
5-13
5-13
5-14
5-15
5-15
5-16
5-16
5-17
5-18
5-19
5-20
5-20
5-20
5-21
5-22
5-22
5-22
5-23
5-23
5-24
5-24
vi
Introduction
Primary Expressions
Complex Expressions
Expression Types
Examples of Expressions
Variables
System Variables
Operands
Operators
Unary Operators
Binary Operators
Logical Operators
Comparing Operand Types
Evaluation of Expressions
Functions
ABS Function
ALIGN Function
ARG Function
CHR Function
DEFINE Function
FIND Function
JUSTIFY Function
LENGTH Function
LOWER Function
MAX Function
MIN Function
MODULO Function
NUMERIC Funciton
ORD Function
11387 Tandem Computers Incorporated
Contents
5-25
5-25
5-26
5-27
5-28
5-28
Section 6
ROMAN Function
SELECT Function
STRING Function
TRANSLATE Function
UPPER Function
WIDTH Function
System Parameters
6-2
6-3
6-5
6-6
6-7
6-8
6-9
COPIES
DEVICE^TYPE
FORM
HOLD
PRINTER^TYPE
REPORT^NAME
SPOOLOUT
Appendixes
A-1
B-1
C-1
D-1
E-1
F-1
G-1
H-1
Syntax Summary
TFORM Messages
Limits and Defaults
Comparison of TGAL and TFORM
TFORMCVT: Converting From TGAL to TFORM
Moving Between TFORM and T-TEXT
Examples of Function and Macro Constructs
Font Characteristics
Figures
1-10
2-3
Figure 1-1.
Figure 2-1.
A Default-Formatted Page
TFORM Page Layout
11387 Tandem Computers Incorporated
vii
Contents
Tables 1-4
1-9
3-76
3-79
3-81
5-4
5-6
5-9
5-10
5-11
5-14
5-14
5-15
A-12
A-17
A-20
A-21
A-22
D-1
H-2
H-5
H-8
H-11
H-13
viii
Table 1-1.
Table 1-2.
Table 3-1.
Table 3-2.
Table 3-3.
Table 5-1.
Table 5-2.
Table 5-3.
Table 5-4.
Table 5-5.
Table 5-6.
Table 5-7.
Table 5-8.
Table A-1.
Table A-2.
Table A-3.
Table A-4.
Table A-5.
Table D-1.
Table H-1.
Table H-2.
Table H-3.
Table H-4.
Table H-5.
TFORM Units of Measurement
TFORM Formatting Defaults
LEVEL FORMAT Default Values
LEVEL STYLE Default Values
LEVEL CONTENTS Default Values
Syntax of an Expression
SYS_CHARS Characters
SYS_PRINTFLAGS Characters
SYS_SETFLAGS Characters
SYS_STACKFLAGS Characters
Unary Operators
Binary Operators
Logical Operators
Escape Sequences
String Characters Changed by DEFINE
Flags and the PRINT Command
Flags Changed by SET Command
String of Characters Representing Flags
Comparsion of TGAL and TFORM
Priorities of Font Characteristics
Default Fonts and Characteristic Values
Defined Symbol Sets
Stroke Weight
Typeface Values
11387 Tandem Computers Incorporated
Preface
PS TEXT FORMAT (or TFORM) is a command-oriented text formatter.
TFORM operates in two ways: in a sheltered environment under the
control of the T-TEXT text editor, or as an independent text formatter. This
manual describes the second use of TFORM as a stand-alone formatter.
(See the T-TEXT User’s Manual for more information about TFORM in the
T-TEXT environment.)
You use TFORM to control the margins, indentation, headers, footers, and
page numbers of documents that you produce. TFORM can also produce
boldface type, underline, draw boxes, make lists of various kinds, and
provide other enhancements that make the printed result not only readable
but pleasing to the eye. In its most sophisticated applications, TFORM can
print customized form letters, use auxiliary input and output files, make
value substitutions, carry out conditional or repetitive processing, and even
do computations.
What This Book The PS TEXT FORMAT Reference Manual explains in detail the PS TEXT
Is About FORMAT product. This manual contains detailed descriptions of the many
TFORM commands, syntax summaries for each command, some examples
describing the options of more sophisticated commands, and tips for using
the commands. It also describes the more advanced features of TFORM,
such as escape sequences, which include special printing capabilities,
special formatting characters, and value substitution; expressions, which
allow you to handle data and do computations; and system parameters,
which govern the environment and activities of TFORM.
The several appendixes provide you with a syntax summary of the different
elements of TFORM; explanations of the error messages that TFORM
delivers; details of the limits and defaults of TFORM; a description of the
conversion utility TFORMCVT that provides specific pathways between
files formatted with TGAL, T-TEXT, or TFORM; and examples of
FUNCTION and MACRO constructs.
11387 Tandem Computers Incorporated
ix
Preface
Who Should Use This manual assumes that you are familiar with some type of formatter and
This Book have read or glanced at the PS TEXT FORMAT Quick Start and the PS TEXT
EDIT and PS TEXT FORMAT User’s Guide before using this manual.
Note
If you are unfamiliar with using a formatter, then you should first read the PS TEXT FORMAT
Quick Start and the PS TEXT EDIT and PS TEXT FORMAT User’s Guide before attempting
to use this manual to learn TFORM.
The PS TEXT FORMAT Reference Manual is for you if you want:
An overview of the capabilities of TFORM
An explanation of TFORM concepts and definitions of TFORM
terminology
Descriptions and syntax of the TFORM commands and command
options
Details of the more advanced features of TFORM
How to Use
This Book
Use the Table of Contents and the Index to guide you to the appropriate
section or page number.
Section 1, “Introduction to TFORM,” contains an overview of TFORM, basic
concepts and terminology, and instructions for using TFORM with your
text editor.
Section 2, “Overview of TFORM Capabilities,” describes a set of useful
commands and provides examples for using TFORM on basic,
intermediate, and advanced levels.
Section 3, “TFORM Commands,” describes, in alphabetical sequence, the
TFORM commands, including the TFORM-supplied macro packages that
you use exactly like TFORM commands. The descriptions include syntax,
use of the command, command options, examples, and tips.
Section 4, “Escape Sequences,” contains explanations and examples of
formatting characters, controlling special printing effects, and value
substitution.
x
11387 Tandem Computers Incorporated
Preface
Section 5, “Expressions,” describes the constants, variables, operators, and
functions you can use to examine, evaluate, and convert various kinds of
data and to perform computations.
Section 6, “System Parameters,” contains a description of each system
parameter, set by the command interpreter’s PARAM command, that affect
the environment and activities of TFORM.
Appendix A, “Syntax Summary,” lists the syntax descriptions of all TFORM
commands, escape sequences, expressions, and functions.
Appendix B, “TFORM Messages,” lists all the TFORM error messages with
a summary of the intent of each.
Appendix C, “Limits and Defaults,” summarizes the minimum, maximum,
and default values for the various TFORM measurements and environment
settings.
Appendix D, “Comparison of TGAL and TFORM, “ correlates the TFORM
commands with the commands of Tandem’s earlier text formatter, TGAL.
Appendix E, “Converting from TGAL to TFORM,” describes the way that
the conversion program TFORMCVT converts, as precisely as possible,
commands in a TGAL-formatted file to their TFORM counterparts.
Appendix F, “Converting Between TFORM and T-TEXT,” describes the
way that the conversion program TFORMCVT operates bi-directionally to
convert, as precisely as possible, TFORM or T-TEXT commands to their
T-TEXT or TFORM counterparts.
Appendix G, “Examples of FUNCTION and MACRO Constructs,” presents
examples of FUNCTION and MACRO constructs. Each of the examples
provide comments describing various statements in the constructs, and the
MACRO constructs contain the macro invocation commands that run the
different macros.
Appendix H, “Fonts,” describes font characteristics in detail and how
printers load and select fonts.
11387 Tandem Computers Incorporated
xi
Preface
Two reference cards are available for the PS TEXT FORMAT Reference
Manual. One describes TFORM commands and functions; the other
compares TGAL and TFORM commands. Both are intended as condensed
summaries of information that is presented in greater detail in the manual.
What’s New in
This Manual
This edition of the reference manual includes information about new
features of and enhancements to TFORM. The update package (part
number 82243) is also included in this version of this manual. The new
features and enhancements include:
A new FONT option in the STYLE command
A new FONT rendition control escape sequence that lets you change
fonts on a page
In addition, a new appendix describing fonts in detail has been included in
this edition.
xii
11387 Tandem Computers Incorporated
Preface
Where to Go for Some of the information covered in the PS TEXT FORMAT Reference Manual
More Information is also presented in the PS TEXT FORMAT Quick Start, the PS TEXT EDIT
and PS TEXT FORMAT User’s Guide, and in the material displayed by the
HELP command. Two reference cards available for TFORM are:
PS TEXT FORMAT Reference Card
TGAL to TFORM Reference Card
You can use TFORM to format files created with any of these three Tandem
editors: EDIT, PS TEXT EDIT, and T-TEXT. The following manuals and
reference cards provide information on the use of these editors:
PS TEXT EDIT and PS TEXT FORMAT User’s Guide
EDIT Manual
PS TEXT EDIT Quick Start for 3270 Terminals
PS TEXT EDIT Quick Start for 6530 Terminals
PS TEXT EDIT Reference Manual
PS TEXT EDIT Reference Card
PS TEXT EDIT EDIT/VS to TEDIT Reference Card
Getting to Know T-TEXT
T-TEXT User’s Manual
To order copies of these manuals, contact your Tandem sales office.
11387 Tandem Computers Incorporated
xiii
Preface
xiv
11387 Tandem Computers Incorporated
Notation Conventions
You must enter commands in a certain form so that TFORM understands
them. This form is called syntax. To help you learn to use the TFORM
commands, this manual and the TFORM HELP facility adopt certain
conventions for representing syntax. Upper- and lowercase letters have
specific meanings, and certain other symbols are also used to explain how
to enter the command. Spaces and commas separate the parts of the
commands (command name, options, and keywords).
If you would like to study a certain command’s syntax, look up the
individual command in Section 3, “TFORM Commands.”
Notation
Meaning
UPPERCASE
LETTERS
Uppercase letters represent keywords and reserved words; you must
enter these items exactly as shown.
italics
Lowercase italic letters represent variable items that you must supply.
Brackets [ ]
Brackets enclose optional syntax items. A group of vertically aligned
items enclosed in brackets represents a list of selections from which you
may choose one or none.
Braces { }
Braces enclose required syntax items. A group of vertically aligned items
enclosed in braces represents a list of selections from which you must
choose one.
Vertical line |
A vertical line separating items in a horizontally aligned list of options,
enclosed in either braces or brackets, is an alternative to vertical
alignment of the selections.
Ellipsis …
An ellipsis immediately following a pair of brackets or braces indicates
that you can repeat the enclosed syntax items any number of times.
Spaces
If two items are separated by a space, that space is required between the
items. (But if either of the items is a punctuation symbol, such as a
parenthesis or a comma, the space is optional.)
11387 Tandem Computers Incorporated
xv
Notation Conventions
Notation
Meaning
Punctuation
Parentheses, commas, semicolons, and other symbols not described
above must be entered precisely as shown. Quotation marks around any
symbol indicate that it is not a syntax descriptor but a required character,
and you must enter it as shown.
char
is a single character that can be entered from the terminal keyboard.
exp
is an expression of numeric, character, or Boolean type. It may be a
single digit or character, or a complex construct of operators and
operands. Expressions are described in Section 5.
int
is an integer.
num
is a number, either an integer or combination of an integer and a fraction
(either of which may be zero) separated by a decimal point.
string
is one or more characters enclosed in quotation marks.
text
is any combination of one or more characters (no quotation marks
necessary).
title
is a one-, two-, or three-field entity, depending on how you enter it. Its
form is
“ [ text ] [ | [ text ] [ | [ text ] ] ] ”
Vertical bars ( | ) are used as the field delimiters, which divide the title into
left, center, and right fields. TFORM left-justifies any field to the left of the
first delimiter (or if you omit both delimiters), centers any field positioned
between the vertical bars, and right-justifies any field to the right of the
second delimiter. Fields may be empty or spaced-filled, and you can use
any combination of the one, two, or three fields. Titles are enclosed in
quotation marks.
units
xvi
is one of CHARS, CM, DECIPOINTS, INCHES, LINES, MM, PICAS, or
POINTS. TFORM stores all units in the form of decipoints, converting
CHARS and LINES to decipoints at command execution time. Any unit
name may be abbreviated to its first two characters. A table presenting
the conversion factors is presented in Section 1.
11387 Tandem Computers Incorporated
1 Introduction to TFORM
An Overview of
TFORM
PS TEXT FORMAT (we’ll use the more familiar name of TFORM
throughout this manual) is a text formatter. You use it to convert
documents stored as files on disc (files usually created by a text editor) into
usable form on paper. TFORM controls the character width and line height;
adds margins, indentation, headers, footers, and page numbers; and
specifies underlining, boldface type, boxes, and other enhancements that
make the document not only readable but aesthetically pleasing as well.
You can use TFORM to format any variety of documents. Casual users
might want to print a memo or a hard copy of an electronic mail message.
Others who write more often might use TFORM to control the formatting of
reports and other standard business documents. Technical designers and
writers, who create external specifications, articles, and manuals, can use
most or all of the formatting features of TFORM to produce sophisticated
documents.
Creating a Document You follow three basic steps when you use TFORM:
With TFORM
1.
Note
You create a document file, usually with a text editor such as PS TEXT
EDIT (TEDIT) or EDIT/VS.
You could also create a document file by saving PS MAIL messages in one or more files that
you specify. You can even use TFORM interactively—that is, you can converse with
TFORM at your terminal—to enter data directly to TFORM. You type TFORM, then press
RETURN. TFORM responds by displaying the TFORM prompt (a question mark) at your
terminal when it is ready to accept input. Enter commands and text, then press RETURN.
TFORM processes what you have entered, then displays the TFORM prompt when it is
again ready to accept input. Using TFORM interactively is a good way to learn the TFORM
commands and to see how they work. You can also try out unfamiliar features in this
interactive way so that you know what to expect from TFORM when you use a new
command in your document.
11387 Tandem Computers Incorporated
1–1
Introduction to TFORM
2.
You type TFORM commands in your document along with the rest of
the text. These commands tell TFORM how you want the printed file to
look. You usually enter TFORM commands on lines above the text that
you want TFORM to act upon. TFORM distinguishes commands from
your text by specific characters in the command line.
3.
You run TFORM with that document file and give TFORM a print
location to which to send the formatted document. TFORM creates the
formatted output file and sends it to the print location you’ve specified.
Constructing As you create your document (or after you complete it), you enter TFORM
TFORM Commands commands to tell TFORM how to format your printed output. The basic
structure of all TFORM commands is the same. It is described in the
following paragraphs.
Parts of a
TFORM Command
A TFORM command is composed of three parts: the trigger character, the
command name, and any values you supply.
The Trigger Character
A TFORM command line begins with a special character, called a trigger
character, in the first position of the line. TFORM uses the backslash (\)
character as the trigger character by default, but if you’re going to use the
backslash often in your text, you can use the DEFINE TRIGGER command
to specify any other printable character as your trigger, except the following
characters:
#-()<>&.!=
You can’t use these characters because them in other combinations for
special purposes. In this manual, the default backslash (\) character is used
as the trigger character.
1–2
11387 Tandem Computers Incorporated
Introduction to TFORM
You can put multiple commands in a line, separated by semicolons. If you
do this, only the first command on the line is preceded by a trigger; don’t
put triggers before the subsequent commands in the line.
Note
An exception to this general rule is the COMMENT command. If you include a COMMENT
command on a line with other commands, it must be the last command on the line: TFORM
views everything to the right of a comment as commentary and does not print it. In addition,
you must always keep the trigger with the symbolic version of the COMMENT command (\!).
See the description of COMMENT in Section 3 for more details.
The Command Name
The second part of a command is the command name, which is sometimes
followed by one or more options that supply additional information
qualifying the command. In this manual, command names (and other
keywords that may appear in commands) always appear in capital letters,
to identify them as keywords. When you type them in your document,
though, TFORM doesn’t care whether you use uppercase or lowercase
letters.
In most cases, you can abbreviate keywords with as few as three characters.
(Later, when you start creating your own variable and macro names, you’ll
have to make sure that their names are different from TFORM keywords
within the first three characters; otherwise, you won’t be able to abbreviate.)
Values
The third part of a command, not always present, is one or more variable
values that you supply. In this manual, these values appear as lowercase
letters set in italics: int means that you must use an integer for that value,
char represents a character, and so on. You might want to refer to the
“Notation Conventions” summary in the “Preface” section to see the
symbols and abbreviations used to represent the various types of values,
and their characteristics, as well as the general rules for representing
commands and other program entities.
11387 Tandem Computers Incorporated
1–3
Introduction to TFORM
Units
Some commands accept units of measurement. You can use a number of
different units: characters, centimeters, decipoints, inches, lines, millimeters,
picas, or points. You specify them as CHARS, CM , DECIPOINTS ,
INCHES, LINES, MM, PICAS, or POINTS (you can abbreviate any unit
name with its first two or more characters). Whatever unit you use,
TFORM stores it in the form of decipoints. Table 1-1 is a conversion list for
the various measurements.
Note that characters and lines are flexible units; TFORM converts them to
decipoints at command execution time, based on the current pitch setting.
Table 1-1. TFORM Units of Measurement
1–4
Unit
Conversion values
DECIPOINT
POINT
PICA
MM (millimeter)
CM (centimeter)
INCH
CHAR
LINE
1/720 inch
10 decipoints; 1/72 inch
12 points; 1/6 inch
28 decipoints; approx. 1/25 inch
283 decipoints; approx. 2/5 inch
720 decipoints; 72 points; 6 picas; 25.4 mm; 2.54 cm
Width of a character at the current pitch setting
Height of a line at the current vertical pitch
11387 Tandem Computers Incorporated
Introduction to TFORM
Running TFORM
Using RUN
Once you have completed your document and added all your TFORM
commands, you are ready to run TFORM and print your document. You
start TFORM with an implied RUN command from your command
interpreter, specifying your document file as the input file and a print
location as the output file. TFORM processes the input file, creates the
formatted output file, and sends it to the specified print location. (You can,
if you wish, send the formatted document to another edit-format file for
viewing.) TFORM never changes the source file when operating in the
stand-alone mode.
The syntax of the standard RUN command you use from your command
interpreter to start TFORM is presented on the next page. If you want you
can also include standard RUN command options, such as PRI or
NOWAIT, between the slashes. (For more information on using the
RUN command, see the Tandem Advanced Command Language (TACL)
Reference Manual, Volumes 1 and 2.
The following examples of the RUN commands are considered TFORM
invocations; that is, you are “invoking TFORM” from your command
interpreter and you do not need to include the keyword RUN. Notice in the
following examples that you can add comments or TFORM commands after
the second slash:
TFORM /IN NEWSLETR.AUGISSUE, OUT $S.#LQP, NOWAIT/ Check breaks
TFORM /IN COSTMEMO, OUT $LP5/\SET SEQUENCING ON; PRINT PAGE 1
TFORM /IN $DATA3.LETTERS.ACME0624, $S.#HOLD/
11387 Tandem Computers Incorporated
1–5
Introduction to TFORM
TFORM / [ IN infile ][, OUT outfile ] /
 \command [;...]
 text



infile
is the primary input file, an edit-format document file. If you omit the
IN parameter, TFORM accepts input from your terminal keyboard.
outfile
is the file, device, or process (usually the spooler) to which TFORM
sends your document. If you omit the OUT parameter, TFORM sends
its output to your terminal screen.
command
is a TFORM command to be executed before any commands in the
input file. You can enter multiple commands, separated by semicolons.
The first command begins with a backslash (\) character; following
ones don’t. There must be no spaces separating the .forwardslash (/)
that closes the RUN command proper and the backslash (\) trigger
character of the TFORM command.
text
is any text you want to be printed before the text in the input file. Text
is limited to one line.
1–6
11387 Tandem Computers Incorporated
Introduction to TFORM
You can’t mix commands and text in the RUN command. If you start with
one or more commands and follow them with text, TFORM issues an error
message because the text doesn’t resemble any recognizable command (if it
does, you might be in even deeper trouble). If you start with text and
follow it with commands, TFORM thinks the commands are just more text.
When you use an edit file name as the outfile in your RUN command,
TFORM first checks to see if that file name already exists. If it does,
TFORM returns a message that tells you a duplication error occurred. You
can use a different file name for your outfile, or you can purge the
existing file before using that file name, which would then be unique.
You can direct your output to the screen of your terminal by omitting the
OUT portion of the RUN command. You can examine the formatting as
your document is processed by TFORM, and you can make any changes
and corrections to your document before it is printed or filed. (See the
PRINT MANUALLY ON command for a way to view output at your
terminal one page at a time.)
11387 Tandem Computers Incorporated
1–7
Introduction to TFORM
Printing Your Output
The TFORM output usually goes through the spooler, which is a system
program that receives output and stores it on disc until the print location
you have designated becomes available. By sending it to the spooler, you
have a chance to preview the formatted file with PERUSE (another process
you invoke from the command interpreter) and to make any amendments,
adjustments, or corrections before printing the document. (For more
information on the spooler and the PERUSE program, see the Spooler
Utilities Reference Manual.)
You can send the output to either the Tandem 5530 letter-quality printer or
any printer supported by Tandem NonStop systems (TFORM is not
available for use with the NonStop 1+ system). To take full advantage of the
more sophisticated formatting features such as boldface and shadow print,
subscripts and superscripts, and proportional spacing you must use the
Tandem 5530 letter-quality printer. Although, you can send documents
containing TFORM commands for those features to any Tandem supported
printer, TFORM simply ignores—or flags with warning messages—the
commands that request those features.
In output directed to the 5530 letter-quality printer, TFORM includes
special control characters (for features such as pitch control or boldface
type). TFORM determines if you are sending output to the 5530 from the
spooler, location you give in the RUN COMMAND. If you use a temporary
print location for the spooler output (so that you can examine the formatted
document with PERUSE before redirecting the file to the letter-quality
printer), the printed document will be different from one sent directly to the
5530, because the special control characters will not have been included in
the file.
Default Formatting
1–8
If you send a file to the printer that contains no TFORM commands at all,
TFORM uses its formatting defaults to print your document. A default is
the value TFORM automatically uses if you don’t give it explicit
information. Table 1-2 lists the values that TFORM automatically uses as its
formatting defaults.
11387 Tandem Computers Incorporated
Introduction to TFORM
Table 1-2. TFORM Formatting Defaults
Feature
Default Value
Form length
Form width
Top margin
Bottom margin
Left margin
Right margin
Horizontal pitch
Vertical pitch
Interline spacing
Line justification
Line joining
Headers
Footers
Page numbers
Hyphenation
11 inches
8.5 inches
0.5 inch
0.5 inch
0.75 inch
0.75 inch
10 characters per inch
6 lines per inch
Single spacing
Left-justified, ragged right
Off
None
None
None
Off
The default combination of form size, horizontal and vertical pitches, and
single spacing gives you up to 70 characters per line and up to 60 lines
per page.
If you printed a page using only these formatting defaults, you would get
an output document with a page format like the one shown in Figure 1-1.
This do-nothing formatting is probably sufficient for printing ordinary
documents such as memos or electronic mail messages.
11387 Tandem Computers Incorporated
1–9
Introduction to TFORM
Figure 1-1. A Default-Formatted Page
texttexttext this is line 1 texttexttexttexttexttexttexttexttexttext
ttexttexttext this is line 2 texttexttexttexttexttexttexttexttexttext
xttexttexttext this is line 3 texttexttexttexttexttexttexttexttexttext
exttexttexttext this is line 4 texttexttexttextmoretexttexttexttext
texttexttexttext this is line 5 texttexttexttexttexttexttexttexttext
ttexttexttexttext this is line 6 texttextandmoretexttexttexttexttext
xttexttexttexttext this is line 7 texttexttexttexttexttexttexttexttext
exttexttexttexttext this is line 8 texttexttexttexttexttexttexttext
texcollectortexttext this is line 9 texttexttextstillmoretexttexttext
ttexttexttexttexttext this is line 10 texttexttexttexttexttexttexttext
xttexttexttext this is line 11 texttexttexttexttextmumblemumbletext
exttexttexttext this is line 12 texttexttexttexttexttexttexttexttext
texttexttexttext this is line 13 texttextandyetevenmoretexttexttext
ttexttexttexttext this is line 14 texttexttexttexttexttexttexttexttext
xtmoretexttexttext this is line 15 texttexttexttexttexttexttexttext
exttexttexttexttext this is line 16 texthowaboutthistexttexttexttext
texttexttexttexttext this is line 17 texttexttexttexttexttexttexttext
ttextgoodtexttexttext this is line 18 texttextpsstbuddywantsometext
xttexttexttexttexttext this is line 19 texttexttexttexttexttexttext
exttexttexttexttexttext this is line 20 texttexttexttexttexttexttext
teincometexttext this is line 21 textnobodymakestextlikethisanymore
ttexttexttexttext this is line 22 texttexttexttexttexttexttexttexttext
xttexttexttexttext this is line 23 texttexttexttexttexttexttexttext
exttexttexttexttext this is line 24 texttexttexttexttexttexttexttext
texttexttexttexttext this is line 25 texttheeyesoftextareuponyoutext
ttextdumdedumtexttext this is line 26 texttexttexttexttexttexttexttext
xttexttexttexttexttext this is line 27 texttexttexttexttexttexttext
exttexttexttexttexttext this is line 28 texttexttexttexttexttexttext
texttexttexttexttexttext this is line 29 textawholebunchoftexttext
ttextttheyellowroseoftext this is line 30 texttexttexttexttexttexttext
xttexttexttexttext this is line 31 texttexttexttexttexttexttexttext
exttexttexttexttext this is line 32 texttexttexttexttexttexttexttext
texttexttexttexttext this is line 33 textcanyoubelievethistexttexttext
ttexttexttexttexttext this is line 34 texttexttexttexttexttexttexttext
xttexttexttexttexttext this is line 35 texttexttexttexttexttexttext
exttexttexttexttexttext this is line 36 texttexttexttexttexttexttext
texttextidermisttexttext this is line 37 texttextonetoknowonetexttext
ttexttexttexttexttexttext this is line 38 texttexttexttexttexttexttext
xttexttexttexttexttexttext this is line 39 texttexttexttexttexttext
extlovethistexttexttexttext this is line 40 texttexttexttexttexttext
texttexttexttexttext this is line 41 textnothingissurebutdeathandtext
ttexttexttexttexttext this is line 42 textthumbtexttexttexttexttext
xttexttexttexttexttext this is line 43 textareyoutheretexttexttext
extrareadallaboutittext this is line 44 texttexttexttexttexttexttext
texttexttexttexttexttext this is line 45 texttexttexttexttexttexttext
ttexttexttexttexttexttext this is line 46 textIhadsometextbutitdied
xttextnicetexttexttexttext this is line 47 texttexttexttexttexttext
exttexttexttexttexttexttext this is line 48 textsenselesstexttext
texttexttexttexttexttexttext this is line 49 texttexttexttexttexttext
ttextdukeofearldukeofearltext this is line 50 textstilltexttexttext
xttexttexttexttexttext this is line 51 textofthesermontexttexttexttext
exttexttexttexttexttext this is line 52 texttextcontexttexttexttext
texttexttexttexttexttext this is line 53 texttexttexttexttexttexttext
ttextyrannosaurustexttext this is line 54 texttexttastetexttexttext
xttexttexttexttexttexttext this is line 55 texttexthelpmothertexttext
exttexttexttexttexttexttext this is line 56 texttexttexttexttexttext
texttextextortionisttexttext this is line 57 textimonialtexttexttext
ttexttexttexttexttexttexttext this is line 58 texttexttexttexttexttext
xttextisanybodyreadingthistext this is line 59 texttexttexttexttext
pretexttexttexttexttexttexttext this is line 60 texttexttexttexttext
S8015-001
1–10
11387 Tandem Computers Incorporated
2 Overview of
TFORM Capabilities
Command Overview
The TFORM command set is designed to meet the needs of a broad range of
users. You can think of it as having several layers of capability. At its core
are the commands to handle the basic formatting that every document
requires (and that every user uses). Beyond that are the commands that
only more specialized documents require (and that only more sophisticated
users are likely to have need of).
Included in the core are:
The full complement of formatting commands to control margins and
indentation, the placement and content of page headers and footers
(including page numbers), line joining and justification, hyphenation,
sentence and paragraph style, horizontal and vertical pitch, tab stops,
boxed text, and the printing of marginal sequence numbers and change
indicators.
A set of escape sequences that you can include in your text to control
the way text appears (such as boldface, underlining, and
superscripting) and to handle special formatting cases (such as
tabulation, hyphenation, or a required carriage return).
A set of predefined macros that enable you to organize your document
into sections and subsections, to format lists of all types, to manipulate
calendar dates, and to produce form letters.
The second layer of capability, for more advanced users, includes:
A set of control commands to insert nonprinting documentation in the
source file, to source in data from other files, to manipulate auxiliary
files for form-letter production or similar applications, to change font
characteristics, and to define your own control characters.
A set of program commands to perform repetitive formatting; to
perform conditional operations based on evaluation of numeric,
character, or logical expressions; and to create functions and macros
that perform specialized sets of operations whenever they are called (a
macro is like a small program or subroutine; a function is like a macro,
except that it can return a value).
11387 Tandem Computers Incorporated
2–1
Overview of TFORM Capabilities
The following paragraphs attempt only a brief survey of the capabilities of
TFORM. They take a closer look at the core features than at the advanced.
For a full description of the commands touched on here, refer to Section 3.
Basic Formatting The first thing you need to learn is how to control the basic structure of
With TFORM your page with TFORM. Figure 2-1 identifies the elements of page layout
that TFORM recognizes and allows you to affect. The paragraphs that
follow describe briefly how to:
Indicate form length and width
Set margins
Set up headers and footers
Join and justify text
Center text
Indent text
Leave blank space in text
Handle page breaks
Indicating Form Length
and Width
TFORM has no way of knowing what size paper you’re using unless you
tell it. If you don’t tell it, TFORM assumes that you’re using a standard
8-1/2 by 11-inch page. To specify a different form size, you use the STYLE
command. For example, if you have a 7 by 9-inch page, type the following
commands at the beginning of your input file:
\STYLE FORM WIDTH 7 INCHES
\STYLE FORM LENGTH 9 INCHES
2–2
11387 Tandem Computers Incorporated
Overview of TFORM Capabilities
Figure 2-1.
TFORM Page Layout
Form Width
Use PRINT
OFFSET
to shift
the entire
formatted
page to the
right or left
Top Margin
Print Offset
Left
Header
Margin
First Header
.
.
.
HEADER REGION
nth Header
Right
Header
Margin
Header Gap
Left
Margin
TEXT REGION
Right
Margin
Form
Length
The text area
adjusts to
accommodate
the number of
headers and
footers
Footer Gap
Use INDENT
LEFT or
INDENT
RIGHT to
temporarily
adjust your
margins
Left
Footer
Margin
First Footer
.
.
.
FOOTER REGION
nth Footer
Indent Left
Bottom Margin
Right
Footer
Margin
Indent Right
S8015-002
11387 Tandem Computers Incorporated
2–3
Overview of TFORM Capabilities
You can abbreviate these commands or express the measurements in other
units if you choose. Each of the following sets of command examples, for
instance, are equivalent to the previous ones:
\STY FOR WID 7; STY FOR LEN 9
Notice that you can combine two or more commands on a command line if
you separate them with semicolons.
\STYLE FORM WIDTH 42 PICAS
\STYLE FORM LENGTH 648 POINTS
When you don’t explicitly indicate a unit of measurement with STYLE
FORM, TFORM assumes inches.
Setting Margins
Use the STYLE MARGIN command if you want to change the default
margins. If you want, for example, to set your top and bottom margins to
half an inch, simply type:
\STYLE MARGIN TOP 0.5
\STYLE MARGIN BOTTOM 0.5
You can change left and right margins in similar fashion, using STYLE
MARGIN LEFT and STYLE MARGIN RIGHT.
Suppose you want to set the margins all around your page to 1 INCH. You
can do so with the following command line at the beginning of your input
file:
\STY MAR TOP 1; STY MAR BOT 1; STY MAR RIG 1; STY MAR LEF 1
When you don’t explicitly indicate a unit of measurement with STYLE
MARGIN, TFORM assumes inches.
2–4
11387 Tandem Computers Incorporated
Overview of TFORM Capabilities
Setting Headers
A header is a line of text that prints across the top of each page of your
document. Generally, you use headers (or running heads, as they’re
sometimes called) to display information about the document to which a
page belongs or about the content of the page.
To set up a header, you use the HEADER command, enclosing in quotation
marks the text that you want to print. TFORM lets you divide your header
into three separate fields that print left-justified, centered, and rightjustified, respectively. If you want the header to be separated into parts or
printed in specific fields, you use vertical bars to tell TFORM which parts to
print where.
Suppose you want to use the header “Section 2: Overview.” If you want it
to appear right-justified, your HEADER command should look like this:
\HEADER "||Section 2:
Overview"
If you want the same header centered, your command should look like this:
\HEADER "|Section 2:
Overview|"
Finally, if you want the header separated into two parts, one left-justified
and the other right-justified, your command should look like this:
\HEADER "Section 2||Overview"
11387 Tandem Computers Incorporated
2–5
Overview of TFORM Capabilities
TFORM also lets you vary the placement of your header from page to page.
Suppose you plan to print your document using both sides of the paper and
then binding it like a book. You’d probably want your headers to appear in
the outer corners for highest visibility. Thus, on the left-facing (or evennumbered) pages, you’d want the header to be left-justified; and on the
right-facing (or odd-numbered pages), you’d want the header to be rightjustified. Your TFORM commands in that case should look like this:
\HEADER EVEN "Section 2: Overview"
\HEADER ODD "||Section 2: Overview"
Setting Footers
A footer is just like a header, except that it’s at the bottom of the page.
Typically, you use footers for version information, notices of copyright or
confidentiality, or page numbers.
As with headers, TFORM lets you divide a footer into three separate fields.
You can also vary the placement of your footer from page to page. Finally,
if you put the character “#” anywhere in the text of your footer, TFORM
substitutes the current page number for it.
Suppose you want a three-part footer with “Copyright 1986” left-justified,
“Company Confidential”centered, and the page number right-justified.
Your FOOTER command should look like this:
\FOOTER "Copyright 1986|Company Confidential|#"
Or maybe you’re binding your document like a book and just want page
numbers in the outer corners for maximum visibility. Your commands
should look like this:
\FOOTER EVEN "#"
\FOOTER ODD "||#"
2–6
11387 Tandem Computers Incorporated
Overview of TFORM Capabilities
More About Headers and Footers
When establishing headers and footers, remember:
TFORM lets you define up to ten headers and ten footers; ordinarily
you won’t want more than one or two of each. If you plan to use more
than one header or footer per page, you must identify them in your
commands as HEADER 1, HEADER 2, FOOTER 1, FOOTER 2, and
so on.
You can use the character # in the HEADER command instead of the
FOOTER If you want the page number to appear at the top of your
page.
You can print a date in your header or footer with the TODAY
command and the SYS_DATE variable. See Section 3.
TFORM lets you define margins for your headers and footers
independent of the margins you establish for the body of your text. If
you want special margins for your headers (or footers), simply use a
version of the STYLE MARGIN command with the further
qualifications HEADER LEFT and HEADER RIGHT (or FOOTER LEFT
and FOOTER RIGHT).
To define the distance between your last header and the beginning of
the text on your page (or between the last line of text and the first
footer) use the STYLE GAP command. For instance, if you want a twoline gap separating headers and footers from text, your commands
should look like this:
\STYLE GAP HEADER 2 LINES
\STYLE GAP FOOTER 2 LINES
If you don’t define a gap, TFORM sets it to one line, unless there are no
header or footer lines to be separated from the text; in that case, the gap
is zero.
TFORM always prints single-spaced headers and footers, regardless of
the interline spacing defined for the text region.
11387 Tandem Computers Incorporated
2–7
Overview of TFORM Capabilities
Joining Text
Once you’ve established your margins, you can allow TFORM to decide
where lines should end to best fill the available space. If you tell TFORM to
join all lines automatically, you don’t have to worry about whether the lines
of text as you type them are too long or too short. You do this with the SET
command:
\SET JOIN ON
When joining is in effect, TFORM examines each line as it formats it and, if
the line is too long, TFORM breaks off one or more words and begins the
next line with them. If a line is short enough that one or more words from
the next line will fit, TFORM brings enough words up from the next line to
fill the current one. This continues until TFORM runs out of input lines to
process or finds a blank line, a page break, a mandatory line break, or a SET
command to turn joining off. This form of the SET command is:
\SET JOIN OFF
If you’re using unedited data, formatting with JOIN ON can minimize “line
too long”errors. But if you’re not careful, you may find that what you
intended to display as an indented example or as a column of words has all
been joined together in continuous lines. You can prevent this by turning
joining off at the start of the column and turning it back on again at the end,
or by telling TFORM to force a line break. To do the latter, insert a
command between each line that you don’t want joined. The BREAK
command has two forms:
\
\BREAK
2–8
11387 Tandem Computers Incorporated
Overview of TFORM Capabilities
Justifying Text
TFORM also lets you justify your text. If you want both the right and left
ends of formatted lines to align on their respective margins, use the SET
command to tell TFORM:
\SET JUSTIFY ON
When TFORM has completed regular formatting of a line, it starts adding
extra space—alternating left and right sides of the line and working inward
from the ends—until the line just fills the line width determined by
whatever margins are in effect.
With most printers, this means adding blanks between words. With the
5530 letter-quality printer, TFORM can “microjustify,” inserting tiny
microspaces between letters; when joining and justification are both on, the
adjustment is usually impossible to spot. Also with the 5530 printer,
TFORM can squeeze a line until it fits if it is slightly too long and would
otherwise have to be broken off and padded with spaces.
TFORM continues justifying until it finds a blank line, a page break, a
mandatory line break, the end of the file, or a SET command to turn
justifying off. This form of the SET command is:
\SET JUSTIFY OFF
Note
With justification on and joining off, TFORM can’t take words from a following line to extend
a short line, so the amount of space added to that line can produce unacceptable results.
For this reason, you should ordinarily use joining and justification together.
If joining and justification are both in effect, a SET JOIN OFF command also turns off
justification. A subsequent SET JOIN ON command turns justification back on as well
(unless in the meantime you enter a SET JUSTIFY OFF command).
11387 Tandem Computers Incorporated
2–9
Overview of TFORM Capabilities
Centering Text
If you want to center text on a page, use the CENTER command. To center
five lines of text, for example, type the following command on the line just
before the lines you want centered:
\CENTER 5
You can also tell TFORM to center all following lines until it sees a blank
line, a command line, or until you turn centering off. The forms of the
CENTER command that you use in these cases are, respectively:
\CENTER BLANK
\CENTER COMMAND
\CENTER ON
\CENTER OFF
If line joining is on, the CENTER command causes a line break.
Indenting Text
Indentation is a temporary change to a side margin. With TFORM, you can
indent on the left, on the right, or both. You can indent inward (toward the
center of the page) or outward (toward the edge). You can indent a single
line, a specific number of lines, or large blocks of text.
If, for example, you want to indent a line three characters from the left,
simply type:
\INDENT 3
2–10
11387 Tandem Computers Incorporated
Overview of TFORM Capabilities
Unless you explicitly indicate a direction of indentation, TFORM assumes
you mean LEFT. If you want to indent from the right or on both sides, use
INDENT RIGHT or INDENT BOTH and the number of characters. Unless
you explicitly indicate a unit of measurement, TFORM assumes you mean
characters.
To indent some number of lines—say, five—three characters each, type:
\INDENT 5 3
You could also tell TFORM to indent all following lines three characters
each until it sees a blank line, a command line, or until you turn indenting
off. The forms of the INDENT command that you use in these cases are,
respectively:
\INDENT BLANK 3
\INDENT COMMAND 3
\INDENT ON 3
\INDENT OFF
Some things to remember about indentation:
You can increase or decrease the current indentation by using an
explicit + or - sign when specifying the indentation amount. A + sign
causes further indentation inward; a - sign causes indentation outward.
If this causes the indentation to become less than zero, you get negative
indenting—toward the edge of the form.
If line joining or justifying is in effect when you tell TFORM to indent,
TFORM joins or justifies the appropriate number of lines at the
indented line length.
11387 Tandem Computers Incorporated
2–11
Overview of TFORM Capabilities
There is a one-character difference between setting a margin and
indenting. A margin setting of 10 starts you at position 10; when you
indent 10 spaces, you begin typing at position 11.
When you use a form of INDENT like INDENT 5 3, indicating a specific
number of lines to indent, TFORM indents whatever text you’ve typed
on that number of input lines. The formatted result depends on such
factors as pitch, line width, and joining, as well as on the amount of text
you’ve typed on your input lines. You may get more indented lines
than the number you specified, or you may get fewer.
Indentation can be nested. For example, if you type the command
INDENT ON 10, then later the command INDENT ON 15, you’ll get a
certain number of lines indented 10 characters, then a certain number of
lines indented 15 characters. When you type an INDENT OFF
command, indentation reverts to 10 characters; it takes a second
INDENT OFF command to turn off the initial indentation you specified.
Similarly, if you type INDENT 12 10, then four lines later type INDENT
4 20, you get four lines indented 10 characters, then four lines indented
20 characters, then four lines indented 10 characters; indentation then
goes back to zero. The first INDENT command counts the lines
indented by the second command as part of its operation to indent
12 lines.
Leaving Blank Space
in Text
If you want to create some amount of blank space in your text—to make
room for a pasted-in illustration, for example—use the SPACE command.
To create a blank space of five lines, for example, simply type:
\SPACE 5
Unless you explicitly indicate a unit of measurement, TFORM assumes you
mean lines.
Interline spacing has no effect on the SPACE command. The command
shown above causes TFORM to leave five blank lines at the current vertical
pitch, even if it is formatting text at double or triple spacing.
2–12
11387 Tandem Computers Incorporated
Overview of TFORM Capabilities
Handling Page Breaks
There are two ways of handling page breaks with TFORM: you can let
TFORM make page breaks arbitrarily or you can tell TFORM whenever you
want to start a new page.
As TFORM formats, it keeps track of the number of lines remaining in the
text region of the current page. In the absence of any instruction from you,
TFORM automatically stops formatting text when no more free lines are
left, prints the page footer (if any), and advances to the next page.
If you want to tell TFORM when to start a new page, use the NEW
command. Just before the line with which you want the new page to
start, type:
\NEW
If you want the text to print on the next odd or the next even page, you can
type either NEW ODD or NEW EVEN. In that case, TFORM advances
either one or two pages, as necessary, incrementing the page counter
accordingly. For example, if the current page is page 3 and you type a
NEW ODD command, TFORM prints a blank page 4 (with headers and
footers), and then begins printing page 5.
In addition to this direct page control, you can exert a kind of conditional
page control with TFORM. You can tell it when you want some block of
text kept together—either on the current page if that’s possible or, if not, at
the top of a new page. You do this with the KEEP command. If you want
the next ten lines kept together on a page, for example, type:
\KEEP 10
If there isn’t enough space on the current page to accommodate the
formatted equivalent of the next ten lines of text in your file, TFORM stops
formatting text on the current page, prints the footer (if any), and begins the
next page with the text that follows the KEEP command.
11387 Tandem Computers Incorporated
2–13
Overview of TFORM Capabilities
You can also tell TFORM to keep all following lines together until it sees a
blank line, a command line, or until you turn KEEP off. The forms of the
KEEP command that you use in these cases are, respectively:
\KEEP BLANK
\KEEP COMMAND
\KEEP ON
\KEEP OFF
Tips
Since the STYLE command sets up page-formatting conditions that
typically remain in effect throughout a document, put all your STYLE
commands at the beginning of your input file before any text. If you
later decide to change some aspect of the format controlled by STYLE,
do so at the beginning of a page, placing the appropriate STYLE
commands immediately after an explicit NEW command.
To reset to its default any element of page format governed by the
STYLE command, simply type that STYLE command without any unit
of measure at all. For example, STYLE MARGIN RIGHT resets the
right margin to its default. Similarly, STYLE MARGIN resets all
margins to their defaults.
2–14
11387 Tandem Computers Incorporated
Overview of TFORM Capabilities
TFORM lets you put notes in your input file that it does not construe as
text when formatting. To do this, use the COMMENT command,
following it on the same line with whatever text you want. You can use
this feature for such things as file history, reminders to yourself about
how you’ve set up the file, or instructions for someone else about how
the file should be handled. For example:
\COMMENT
\COMMENT
\COMMENT
The following market data was obtained from the
product manager on 10/15/85 and should be updated
before the final report is printed.
Since TFORM ignores all COMMENT command lines, a note like this
anywhere in your input file does not affect your formatted output at all.
Creating Special Beyond basic page layout, you need to be able to accomplish a number of
Effects With TFORM other special effects—such as levels of headings, lists, and boxes—in
ordinary document formatting. The following paragraphs explain how you
use TFORM to:
Control sentence and paragraph spacing
Use levels of headings in text
Create lists
Create boxes
Use tabs
Control hyphenation
Use sequential line numbers
Print marks in the margin
Customize your text
Control the printed output
Sentence and
Paragraph Spacing
The STYLE SENTENCES and STYLE PARAGRAPHS commands help you
control the horizontal and vertical white space so that your pages will
appear the way you want them.
11387 Tandem Computers Incorporated
2–15
Overview of TFORM Capabilities
Sentence styling controls the number of spaces following the end of a
sentence. Paragraph styling involves the gap between paragraphs,
indentation of the first line of a paragraph, and protection from stranded
single words or lines at the beginning or end of a page.
Note
For these STYLE commands to have much effect, you must turn on joining with SET JOIN
ON. Without joining, TFORM leaves your text basically as it finds it in your file.
Sentence Formatting
Perhaps you prefer one space following the end of each sentence in your
document. Simply type:
\STYLE SENTENCES 1
The values you can use with this command are 0, 1, and 2. TFORM
automatically adds two spaces if you just type STYLE SENTENCES.
If you want TFORM to use exactly the number of spaces you put after
sentences in the input file, type:
\STYLE SENTENCES VERBATIM
Gaps Between Paragraphs
When joining is on, TFORM treats any block of text between blank lines as a
paragraph. You can have more than one blank line between your
paragraphs, or you can have a gap of zero if you want to run paragraphs
together. You use the STYLE PARAGRAPHS command to control the
number of blank lines between paragraphs. If you want four blank lines
between paragraphs, for example, type:
\STYLE PARAGRAPHS GAP 4
TFORM makes sure that four blank lines follow each paragraph, despite the
number of blank lines that follow the paragraph in your file. If you don’t
specify any unit of measurement, TFORM assumes you mean lines.
2–16
11387 Tandem Computers Incorporated
Overview of TFORM Capabilities
Paragraph Indentation
Suppose you want to indent the first line in every paragraph five characters.
You do this with the STYLE PARAGRAPHS INDENT command:
\STYLE PARAGRAPHS INDENT 5
If you don’t give a unit of measurement, TFORM assumes you mean
characters.
You can increase or decrease the existing amount of indentation by typing
an explicit + or - sign with your numerical value:
\STYLE PARAGRAPHS INDENT +2
\STYLE PARAGRAPHS INDENT -2
Widow and Orphan Protection
A “widow”appears in your text when the last line of a paragraph is broken
off because of lack of space; it is then carried over to the next page. An
“orphan”appears when the first line of a paragraph appears alone at the
bottom of a page while the rest of the paragraph is carried over to the next
one. For protection against these fragments, you can use the STYLE
PARAGRAPHS BOTTOM or STYLE PARAGRAPHS TOP commands.
This command tells TFORM that the bottom three lines, for example, of a
paragraph must be kept together on the same page:
\STYLE PARAGRAPHS BOTTOM 3
If there isn’t enough room for that many lines on the current page, TFORM
inserts a page break before the paragraph and puts those lines at the top of
the next page. Even if you aren’t using this command, the default is two
lines; TFORM won’t ever break off a single line.
11387 Tandem Computers Incorporated
2–17
Overview of TFORM Capabilities
The STYLE PARAGRAPH TOP command works the same way STYLE
PARAGRAPH BOTTOM does. This command tells TFORM to keep the top
three lines of a paragraph together on the same page:
\STYLE PARAGRAPHS TOP 3
To reset these commands to their defaults (2 lines), type:
\STYLE PARAGRAPHS BOTTOM
\STYLE PARAGRAPHS TOP
To reset all paragraph styling—TOP, BOTTOM, GAP, and INDENT—to
their defaults, simply type:
\STYLE PARAGRAPHS
Using Levels of
Headings in Text
TFORM offers eleven levels of headings, from level 0 to level 10. Level 0 is
the highest; it usually identifies a major section or chapter (it’s generally
used as the title for the entire document). The command that defines it is
different from the ones that define levels 1 through 10. With level 0, you
supply a title for TFORM to use as the heading; this title contains three
parts, or fields. You separate these fields in the command line with vertical
bars. You must specify something for all three fields, but any can be empty
or blank-filled:
\LEVEL 0 "Chapter|8|High Risk, High Return"
\LEVEL 0 "INDEX||Section 1"
TFORM joins the first two fields and places them together on one line, then
places the third field on a separate line. By default, these two lines are
centered with no blank lines between them and positioned 10 lines down
from the top of a new odd page.
2–18
11387 Tandem Computers Incorporated
Overview of TFORM Capabilities
For lower-level headings, you simply add the text on the command line,
placing the text in quotation marks like the level 0 head. Here are several
examples:
\LEVEL 1 "Globe Trotting on a Shoestring"
\LEVEL 4 "Vacationing in Morocco"
\LEVEL 5 "Stretching Your Travel Dollars:
Marrekech"
These examples show the simplest way to use the LEVEL command to
create headings. Each of the levels of heads have preset defaults that
TFORM uses to style the headings.
Heading Format Specifications
To control the spacing around your heads, use the LEVEL FORMAT
command. A LEVEL FORMAT 0 command applies to level 0 headings,
LEVEL FORMAT 1 to level 1 headings, and so on. Here is an example:
\LEVEL FORMAT 2
BEFORE 3
AFTER 2
The first number is the level number, the second is the number of blank
lines to go before the printed heading, and the third denotes how many
blank lines are to follow it.
If you give a negative number for AFTER, TFORM prints the title as a
“run-in” heading.
You can also use the keyword PAGE to tell TFORM to start the heading at
the top of the next page:
\LEVEL FORMAT 2
BEFORE 3
11387 Tandem Computers Incorporated
AFTER 2
PAGE
2–19
Overview of TFORM Capabilities
Heading Style Specifications
To control the style in which TFORM prints section headings, use the
LEVEL STYLE command. LEVEL STYLE 0 takes care of level 0 headings,
LEVEL STYLE 1 is for level 1 headings, and so on. You can print your
headings in boldface, with numbers, underscored, centered, or with
combinations of these features. However, for the LEVEL STYLE command
to work properly, you must enter one of these three options: LEFT,
CENTER, or RIGHT.
If you type the following, your level 1 headings will appear left-justified
and in boldface:
\LEVEL STYLE 1 LEFT BOLD
If you type the following, your level 2 headings will appear centered and
underscored:
\LEVEL STYLE 2 CENTER UNDERLINE
And if you want your level 3 headings to be right-justified and numbered,
you type:
\LEVEL STYLE 3 RIGHT NUMBER
If you specify certain features and leave off others that are part of the
default style for that level, those default features will be turned off.
2–20
11387 Tandem Computers Incorporated
Overview of TFORM Capabilities
Creating a Table of Contents
When you use LEVEL commands, TFORM stores each heading you enter
with the LEVEL int command (LEVEL 1 “title”, LEVEL 2 “title”, and so on).
Unless you force a partial table of contents, TFORM automatically generates
a table of contents for each section, using all the stored heads, at the end of
its processing run.
The LEVEL CONTENTS command controls the format of the table of
contents; you can also refer to the description of the CONTENTS command
to learn about adding extra headings to the table of contents and forcing a
partial table of contents.
Creating Lists
The LIST command lets you create many different types of lists. You can
have alphabetic lists, numeric-sequence lists (using Roman numerals as
well as Arabic), and bulleted lists. You can even have lists in special
ordering formats that you define. A list can also contain other lists within
it. The numbers, bullets, or letters of the alphabet that you use to order
your lists are called labels; the things that you list are called items.
TFORM separates list items by a gap (one blank line, by default, or however
many you specify) and can indent entire items (including the labels) on
either or both sides by an amount of space that you define.
To create any list, you follow these basic guidelines:
1.
Begin the list with a BEGIN LIST command.
2.
Precede every list item with an ITEM command.
3.
End each list with an END LIST command.
TFORM uses the BEGIN LIST command to determine what label to use for
the list. You add one of several keywords to specify different kinds of
labels—bullets, numerals, and so on. The ITEM command tells TFORM to
print the label before the accompanying text. The END LIST tells TFORM
that it has reached the end of the current list.
11387 Tandem Computers Incorporated
2–21
Overview of TFORM Capabilities
The following examples show how to put together a number of basic lists.
1.
Here’s how to create a bulleted list:
\BEGIN LIST BULLET
\ITEM
This is the first item.
\ITEM
This is the second item.
. . .
\END LIST
When TFORM formats your output, it looks like this:
•
This is the first item.
•
This is the second item.
If you simply type BEGIN LIST, you’ll get a bulleted list by default.
2.
To create a numeric list, simply change your BEGIN LIST command to
BEGIN LIST NUMERIC. The rest stays the same. When TFORM
formats your output it looks like this:
1. This is the first item.
2. This is the second item.
TFORM precedes each list item with a number, a period, and two
spaces; the body of the item is indented four spaces. TFORM assigns
number 1 to the first item and automatically increments the number for
each succeeding item.
3.
To create an alphabetic list, simply change your BEGIN LIST command
to BEGIN LIST ALPHABETIC. Again, the rest stays the same. When
TFORM formats your output it looks like this:
a. This is the first item.
b. This is the second item.
2–22
11387 Tandem Computers Incorporated
Overview of TFORM Capabilities
The letters used for the labels are lowercase by default. If you want to
use capital letters, add the keyword UPPER to the BEGIN LIST
ALPHABETIC command. If your alphabetic list contains more than
26 items, TFORM automatically begins doubling the letters, using “aa.”
and so on for the labels following “z.”
4.
To create a Roman-numeral list, simply change your BEGIN LIST
command to BEGIN LIST ROMAN. Again, the rest stays the same.
When TFORM formats your output it looks like this:
I.
This is the first item.
II. This is the second item.
The Roman numerals are uppercase by default. If you want small
Roman numerals, use the keyword LOWER with the BEGIN LIST
ROMAN command.
Creating Boxes
The SET BOX command lets you box in areas of text or blank space.
TFORM automatically adds a two-space indent on each side to provide
margins, inserts one blank line between the top of the box and the first text
line, and inserts another blank line after the last line of text before closing
the box. If joining or justifying is on when you create your box, it remains
in effect inside the box.
To start a box, type:
\SET BOX ON
Begin adding your text that you want enclosed in the box on the next line.
If you want to box a blank space, give TFORM a SPACE command after the
SET BOX ON command; for example:
\SPACE 10 LINES
11387 Tandem Computers Incorporated
2–23
Overview of TFORM Capabilities
To close off your box, type:
\SET BOX OFF
If TFORM comes to the end of the page before reaching the SET BOX OFF
command, it closes off the box at the bottom of the page and starts a new
box at the top of the next. If you think a box may extend over a page and
you want to indicate the continuation with an arrow in the lower righthand corner, simply type:
\SET BOX ON ARROW
TFORM uses hyphens and vertical bars by default to create the horizontal
and vertical sides, respectively. You can change these characters to other
characters with the DEFINE BOX command.
Using Tabs
TFORM always treats the left margin as an automatic tab stop. If you want
to set up additional tab stops, use the SET TABS command. For example:
\SET TABS ON 5, 15, 25, 45
This command sets tab stops in columns 5, 15, 25, and 45.
A simple SET TABS ON command automatically sets tabs in every eighth
position:
\SET TABS ON
2–24
11387 Tandem Computers Incorporated
Overview of TFORM Capabilities
To use the tabs you set, insert the character “ \>” before the text that you
want moved over to a tab position. So, for example, if you are setting up a
three-column table, the input file would begin like this:
\Level 1 "Summary of Vacation and Sick Days--Hours Accrued"
\SET TABS ON 10, 40, 50
\>Employee Name \>Vacation \>Sick
\>Albert, Dan \>30 \>48
\>Alfaro, Victor \>106 \>55
\>Ataka, Cynthia \>86 \>63
. . .
TFORM processes your input to produce a table like this:
Note
Employee Name
Vacation
Sick
Albert, Dan
Alfaro, Victor
Ataka, Cynthia
30
106
86
48
55
63
Spaces have been added in this example file for easier reading; TFORM counts spaces in
determining column positions, so add them with care.
To clear your tab stops, simply type:
\SET TABS OFF
SET TABS is cumulative; when you set additional tabs, they are added to
the ones you’ve set previously. Use SET TABS OFF if you don’t want
previous tabs included with your new ones.
Controlling Hyphenation
If you want TFORM to hyphenate words automatically that don’t fit at the
end of a line, type:
\SET HYPHENS ON
SET HYPHENS ON uses 3 as the default for the number of letters that can
be separated from the beginning or the end of a word.
11387 Tandem Computers Incorporated
2–25
Overview of TFORM Capabilities
To turn off automatic hyphenation, simply type:
\SET HYPHENS OFF
Using Sequential Line
Numbering
If you want TFORM to print sequential line numbers in your right margin,
starting at 1 where the command occurs in the text, then starting over with
1 at the top of the next page, type:
\SET SEQUENCING ON
Six characters must be available in the right margin of your page form for
the sequencing to work. This command stays in effect until you type:
\SET SEQUENCING OFF
Printing Marks
in the Margin
The CHANGES command tells TFORM to print a change mark character
(“|”) in the margin next to each line specified by the command. To turn on
change marking, use the simplest form of the command:
\CHANGES ON
There must be at least two characters available to the right of the line of
your page form to print a blank space and the change mark.
To turn off the insertion of marks, type:
\CHANGES OFF
There are keywords such as BLANK, COMMAND, and int (an explicit
number) to turn CHANGES on and off. Refer to the CHANGES command
in the “TFORM Commands”section for a description of how to use these
keywords. If you want to change the change mark character to some other
character, use the DEFINE CHANGES command.
2–26
11387 Tandem Computers Incorporated
Overview of TFORM Capabilities
Customizing Your Text
To achieve such effects as boldface, overstrike, subscript, underline, and so
on—where the text requiring the special treatment is not necessarily keyed
to whole lines—TFORM provides a number of special control commands
called escape sequences. An escape sequence is a backslash (or whatever
character you are using as your trigger character), followed by a keyword
naming the operation, an open parenthesis, your text, a second trigger, and
a closing parenthesis.
Escape sequences look like commands in that they begin with trigger
characters, but they differ in that they do not need to occur at the beginning
of a line, that the text they affect can extend over several lines, and that they
use a special set of characters to enclose the text receiving the special
treatment. Here are some examples:
1.
If you want to enclose your text in boldface, type:
\BOLD( your text \)
TFORM recognizes the first backslash as signaling an escape sequence.
When it finds “BOLD,”it sets the text within the parentheses in
boldface. The second backslash character signals TFORM that the end
of the sequence is coming up; the second parenthesis defines the end of
the escape sequence.
2.
If you want to print the underscore character under every character
(including blanks) in a portion of your text, type:
\UNDERLINE ( your text \)
3.
If you want to overprint nonblank characters in your text with an
overstrike character, type:
\OVERSTRIKE ( your text \)
By default, the overstrike character is a hyphen; you can change this
character to another with the DEFINE OVERSTRIKE command.
11387 Tandem Computers Incorporated
2–27
Overview of TFORM Capabilities
4.
If you want to create a superscript or a subscript, type:
\UP ( your text \)
or:
\DOWN ( your text \)
TFORM prints superscript or subscript text one-half line above or
below the current line, respectively. These commands only work on
certain printers. If your printer can’t handle superscripts or subscripts,
TFORM issues a warning message and prints the text normally.
Controlling the
Printed Output
To accommodate binding or hole punching of your document, you might
want to offset the text on your page by some amount. TFORM lets you do
this with the PRINT OFFSET command. When you send your document to
the printer, you can also have only certain pages printed by using the
PRINT PAGES command.
Print Offset
The PRINT OFFSET command tells TFORM to shift the whole text area of
your page by the amount of space you specify. You should put the PRINT
OFFSET command at the very beginning of your file, before any text.
Here is an example of using the PRINT OFFSET command with the STYLE
commands at the start of a file:
\STYLE
\STYLE
\STYLE
\PRINT
FORM WIDTH 8.5
MARGIN LEFT 0.5
MARGIN RIGHT 1
OFFSET ALL ODD 0.5
These commands tell TFORM to put a 1/2-inch left margin and a 1-inch
right margin on even-numbered pages (the offset is 0 by default), and to
push odd-numbered pages to the right half an inch to produce a 1-inch left
margin and a 1/2-inch right margin. The keyword ALL tells TFORM to
include page 1 when offsetting the odd pages.
2–28
11387 Tandem Computers Incorporated
Overview of TFORM Capabilities
Page Control
You use the PRINT PAGES command to print specific pages, or a range of
pages, in your document. For example, if you want to print page 18, type:
\PRINT PAGES 18
If you want to print a range of pages, type:
\PRINT PAGES 19/27
To print separate groups of pages, type:
\PRINT PAGES 6, 12/29, 33, 35
You can put this command in your file, but the more useful place for it is
following the RUN command you use to send your document to the printer
(see Section 1). Immediately after the final forward slash of the run
command, you add this command; remember to include the backslash—
this signals TFORM that the text you have added is a command.
Tips
You can use the SET command to make all letters uppercase or
lowercase in a designated area of your text. For example, to start
capitalization, type this command before your designated area:
\SET UPSHIFT ON
To end capitalization, type:
\SET UPSHIFT OFF
Conversely, use SET DOWNSHIFT ON and OFF to make letters all
lowercase in your designated area of text.
11387 Tandem Computers Incorporated
2–29
Overview of TFORM Capabilities
TFORM single-spaces text by default, but you can control the interline
spacing with the SET SPACING command. If, for example, you want to
double-space your text, simply type:
\SET SPACING 2
You can also use 1.5, 3, and so on all the way up to 32.
If you type SET SPACING without any number, you will automatically
get single-spacing (with extra space for subscripts and superscripts if
your printer has this capability).
TFORM gives you the option of changing the characters it uses for
making boxes, marking changes, separating fields in titles, and so on to
another character of your choice (within the constraints of TFORM).
You do this with the DEFINE command.
Escape sequences can be nested. See Section 4 for more details and
examples of escape sequences.
Advanced Features
of TFORM
In addition to all the features briefly touched on in this section, TFORM has
advanced features for the experienced user. The following paragraphs
summarize the purpose of several of these features. They are fully
described in their respective locations elsewhere in this manual.
Sourcing in Other Files
You use the SOURCE command, anywhere in your document, to include
another file as part of the document. You may source in either an edit or a
T-TEXT file. You can open a maximum of 32 files at one time.
This is a useful command if you have, for example, a set of STYLE
commands that you use frequently to format your documents; instead of
adding them to the head of your file each time you start a document, you
can simply source in your file containing those STYLE commands.
Using Auxiliary Files
2–30
You can use the FILE command to manipulate up to eight auxiliary files. At
any one time you can have four files open for read access (you read data
from them into variables) and four files open for write access (you write
data into them). A common way to use this is to read names and addresses
from a data file into the input file for producing form letters.
11387 Tandem Computers Incorporated
Overview of TFORM Capabilities
The FILE command contains a FILE OPEN command, for which you must
specify READ or WRITE; a FILE READ command; a FILE WRITE
command; and a FILE CLOSE command. When TFORM is finished with
your file, it closes all files you opened.
Conditional Processing
Repetitive Processing
Generating Form Letters
The IF construct is a series of related commands in a given sequence
bounding other commands or text that allows you to carry out the
commands (or not), format the text (or not), or allows you to do nothing.
One or more expressions that you include in the IF construct determine
how TFORM uses the commands within the construct.
If you want to perform the same formatting operations repeatedly on a
given document (or part of a document) a controlled number of times, you
can do it with the LOOP construct.
You can create customized form letters with the LETTER macro package,
which consists of two macros: the LETTER macro, which processes the
body of the letter you wish to send, and the ADDRESS macro, which
handles the dating and addressing of each letter.
You follow these basic steps to use the LETTER command:
Create a letter (your body file), in which you place indirect variable
names ( \(var\) ) at the points where you want TFORM to insert
particular items to customize it.
Create a second file of names and addresses to which you want the
letters sent (your list file).
At the beginning of the second file, put a template that associates the
variable names in the body of the letter with the entries in the list file.
TFORM handles the rest of the functions. The LETTER macro package,
including an example of the body file and the list file, is described in
Section 3.
11387 Tandem Computers Incorporated
2–31
Overview of TFORM Capabilities
Creating Your Own Macros
and Functions
You can create your own macros with the MACRO construct, a series of
commands and text that work together somewhat like a subroutine. The
lines between the MACRO BEGIN command and the corresponding
ENDMACRO command define the actions of the macro; these actions can
be almost anything you want within the TFORM environment.
You can also create your own functions with the FUNCTION construct.
The FUNCTION construct is very similar to the MACRO construct, in that
both are able to accept and process arguments. However, the FUNCTION
construct defines an expression and returns its value; it cannot produce any
lines of text.
Section 3 contains the descriptions of the MACRO and FUNCTION
constructs; see Appendix G for example macros, functions, and their
applications.
2–32
11387 Tandem Computers Incorporated
3 TFORM Commands
Command Overview
Formatting Commands
This brief overview of the commands available in TFORM presents the
commands categorized by type of command and briefly summarizes the
commands in each category.
Formatting commands directly control the appearance of the output.
BREAK
forces a line break at the point where it appears; TFORM
suspends joining and doesn’t justify the line preceding the
BREAK command. A trigger character by itself, as well as
certain other commands, also causes a line break. BREAK
PARAGRAPHS causes a paragraph break as well as a line
break.
CENTER
centers input lines in its scope between the established
margins.
CHANGES
prints a change mark in the right margin next to each line
in its scope. Doesn’t cause a break, so you can mark
individual words and phrases; if joining is on, TFORM
marks the lines they’re in.
CONTENTS
adds an entry to the table of contents; can also be used to
print partial table of contents (up to this point) on demand.
FOOTER
defines footer strings to print at the bottom of the page.
You can have up to 10 footers, up to three fields in each
(left-, center-, and right-justified), for the first page, odd
pages, and even pages.
HEADER
defines header strings to print at the top of the page. You
can have up to 10 headers, up to three fields in each (left-,
center-, and right-justified), for the first page, odd pages,
and even pages.
INDENT
indents specified amount from the left margin, right
margin, or both, for all input lines in its scope. Normal
formatting continues within the new temporary margins.
11387 Tandem Computers Incorporated
3–1
Introduction to TFORM
3–2
KEEP
makes sure that input lines within its scope stay together
on the same page.
NEW
starts a new page; you can specify that the next page is to
be odd or even (ejects a blank page if necessary).
PAGE
sets the page number, turns page numbering on and off.
SET
switches various internal TFORM flags on and off to
control formatting aspects such as boxes, joining,
justification, change marks, and hyphenation. Also sets
other parameters such as pitch, interline spacing, and tab
stops.
SOURCE
includes text and TFORM commands from another file,
inserting them where the command appears and
formatting text as though it were part of the primary file.
SPACE
writes a specified amount (lines, inches, whatever) of
white space; can be made to stop spacing on reaching a
page boundary, or to continue for the full amount.
TITLE
writes a 1-, 2-, or 3-part title (with left-justified, rightjustified, and centered text) anywhere in a document.
VERBATIM
treats all lines within its scope as text, ignoring any
commands; writes those lines “as is,” with no other
formatting.
11387 Tandem Computers Incorporated
Introduction to TFORM
Control Commands
Control commands indirectly influence the output by affecting the action of
the formatting commands and the parameters they work with; these
commands also affect the execution and environment of TFORM.
ASSIGN
computes a value from an expression and assigns that
value to a variable.
COMMENT
allows you to insert explanatory comments into your
document without affecting formatting.
DEFINE
specifies characters you want to use as box outlines,
trigger character, page-number representative, change
mark, and so on.
ENV
changes system, volume, and subvolume names used in
file-name expansion for SOURCE and FILE commands.
ERROR
allows TFORM to produce user-written error messages
from within a macro or function that are then integrated
with the normal error messages produced by TFORM.
Both types are listed on a separate errors page.
EXIT
ends TFORM run. Although used primarily in interactive
mode, it can be inserted in the document file to signal early
termination.
FILE
manipulates auxiliary input and output files. For example,
you can read name and address data to insert in a letter, or
write topical data to an index file.
PRINT
specifies print options, such as printing selected numbered
pages or only changed pages, printing/not printing error
messages, and selecting bins on a cut-sheet feeder.
STYLE
defines the overall style of the document, including form
size, margins, header and footer area structure, sentence
and paragraph styling, and font characteristics.
11387 Tandem Computers Incorporated
3–3
Introduction to TFORM
Programmatic Commands
You can use programmatic commands to create program-like constructs for
performing conditional, repetitive, or parameter-driven processing.
Programmatic commands are a little different than the other commands.
They cannot be abbreviated like the previous types of commands, and they
cannot be combined with other commands (except with COMMENT); each
must be on a line by itself.
3–4
FUNCTION
RETURN
ENDFUNCTION
together form parameter-driven constructs,
which are similar to the macro constructs.
You can invoke a function during formatting
to define an expression, which then becomes
the value of the function at the point at
which it is called.
IF
ORIF
ELSE
ENDIF
together form conditional-processing
constructs that let you select one path from
several alternative processing paths, based
on some condition you specify.
LOOP
NEXTLOOP
EXITLOOP
ENDLOOP
together form repetitive-processing constructs
that let you perform a sequence of operations
a specified, computed, or derived number
of times.
MACRO
EXITMACRO
ENDMACRO
together form parameter-driven constructs,
resembling subroutines, that you can invoke
during formatting to do specialized operations.
There are also commands to delete macros and
to append lines to them.
11387 Tandem Computers Incorporated
Introduction to TFORM
Standard Macro Summary
These six standard macro packages are supplied with TFORM and perform
formatting and control activities. Their invocations are identical in form to
TFORM commands, and are treated as such for purposes of description
here.
HELP
presents the syntax of all the TFORM commands. HELP is
both a teaching aid to those learning TFORM and a
memory aid for experienced TFORM users.
LEVEL
macros
control the numbering, formatting, and spacing of section
of section headings in your document, and can also
produce a table of contents using those headings.
LIST
macros
provide lists of different types alphabetic, numeric,
(both Arabic and Roman numerals), bulleted, and
customized-label lists. You can also have nested lists.
LETTER
ADDRESS
together give you a way to create customized form
letters, using a single letter body and a file of names and
and addresses.
TI
“Temporary Indent” indents one, and only one, output
line by an amount you specify.
TODAY
manipulates the system variable SYS_DATE so that you
can include today’s date—or any date—anywhere in your
document, in any of several formats.
11387 Tandem Computers Incorporated
3–5
Introduction to TFORM
Command The following pages describe, in alphabetical order, all the TFORM
Descriptions commands and provide a syntax summary, examples, command options
and their explanations, and tips for each command.
ASSIGN
You use the ASSIGN command to associate a variable name with an
expression. TFORM examines the expression (doing any necessary
computations) to evaluate it to a single value, then stores the value in the
variable name. This name can be used as a representation of that value in
later formatting tasks.
What to Enter
\ASSIGN variable-name exp
variable-name
is an identifying name not more than 32 characters in length. It can
contain letters, numerals, and the underscore (_) character. The first
character must be a letter.
exp
is an expression of string, numeric, or Boolean type.
Examples:
1
\ASSIGN my_var 9+5
2
\ASSIGN nickname "The Poet for the Beat Generation"
3–6
1
Puts the value of 14 in the variable my_var
2
Places a long string in the variable nickname
11387 Tandem Computers Incorporated
Introduction to TFORM
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.
11387 Tandem Computers Incorporated
3–7
Introduction to TFORM
Tips
If the value of the expression is a character string, the variable, after the
assignment, is a string variable.
If the expression has a numeric or Boolean value, the variable is of
numeric type after the assignment.
Once the type of a variable has been established, you can’t use it in a
place where an entity of a different type is required. You can, however,
change its type by assigning another value to it.
3–8
11387 Tandem Computers Incorporated
Introduction to TFORM
BREAK
The BREAK command specifies a mandatory line break. You can use it to
override joining and/or justification for columnar work or paragraph
breaks.
What to Enter
\[ BREAK [ PARAGRAPHS ] ]
Examples:
\BREAK
\
1
\BREAK PARAGRAPHS
\BREAK PAR
1
Simply the trigger character
11387 Tandem Computers Incorporated
3–9
Introduction to TFORM
How to Use BREAK
If you are using the SET JOIN ON command, TFORM determines where to
break the lines of your text, using the line length you provide in your
STYLE commands. You can override the automatic joining feature with the
BREAK command to tell TFORM where to break lines or paragraphs in
particular places. Placing the BREAK command on its own line
immediately following the spot where you want the text broken causes
TFORM to execute a carriage return and resume formatting on the next line.
If you specify BREAK PARAGRAPHS, TFORM breaks the line where the
command occurs, adds a paragraph gap, and creates a paragraph
indentation before resuming formatting.
Tips
A trigger character by itself has the effect of the BREAK command.
BREAK PARAGRAPHS signals the start of a new paragraph as well as
causing a line break.
In addition to their own functions, the commands CENTER, DEFINE,
KEEP, SET, SPACE, and VERBATIM also cause mandatory line breaks
when they appear.
The commands FOOTER, HEADER, NEW, STYLE, and TITLE also
cause line breaks and cause paragraph breaks in the same way as a
blank line does.
3–10
11387 Tandem Computers Incorporated
Introduction to TFORM
CENTER The CENTER command centers one or more lines of the printed page
between the current left and right margins.
What to Enter
\CENTER
int
ON
OFF
BLANK
COMMAND




Examples:
\CENTER 5
\CENTER ON
\CEN COM
11387 Tandem Computers Incorporated
3–11
Introduction to TFORM
How to Use CENTER
The different options of the CENTER command are described in the
following paragraphs.
CENTER int
CENTER int centers the input following this command for as many
lines as you specify. If no integer is specified, TFORM centers only the
next line following the command line.
CENTER ON
CENTER ON centers lines until TFORM finds a CENTER OFF
command.
CENTER OFF
CENTER OFF tells TFORM to turn off the centering feature.
CENTER BLANK
CENTER BLANK centers lines until TFORM encounters a blank
input line.
CENTER COMMAND
CENTER COMMAND centers lines until TFORM finds any subsequent
command line.
If you use the CENTER command with no options, TFORM only centers the
line following the command line.
Tips
If you enter a CENTER OFF command without a preceding CENTER
ON command, TFORM issues an error message.
The CENTER command causes a line break.
3–12
11387 Tandem Computers Incorporated
Introduction to TFORM
CHANGES The CHANGES command marks one or more lines of the printed page with
change characters in the margin. The default change mark is a vertical line
(|), but you can change it to another character with the DEFINE command
if you wish.
What to Enter
\CHANGES
int
ON
OFF
BLANK
COMMAND




Examples:
\CHANGES 100
\CHANGES BLANK
\CHA COM
11387 Tandem Computers Incorporated
3–13
Introduction to TFORM
How to Use CHANGES
The different options of the CHANGES command are described in the
following paragraphs.
CHANGES int
CHANGES int marks the input following this command for as many
lines as you specify. If no integer is specified, TFORM marks only the
next line following the command line.
CHANGES ON
CHANGES ON marks lines until TFORM finds a CHANGES OFF
command.
CHANGES OFF
CHANGES OFF tells TFORM to turn off the tagging feature.
CHANGES BLANK
CHANGES BLANK marks lines until TFORM encounters a blank
input line.
CHANGES COMMAND
CHANGES COMMAND marks lines until TFORM finds any
subsequent command line.
If you use the CHANGES command with no options, TFORM will only
mark the line following the command line.
3–14
11387 Tandem Computers Incorporated
Introduction to TFORM
Tips
If you enter a CHANGES OFF command without a preceding
CHANGES ON command, TFORM issues an error message.
TFORM places change marks in the right margin, whether on a righthand page or a left-hand page. A change character appears one space
to the right of the right end of the line it marks (either the actual right
margin of the page or the adjusted right margin—changed by the
INDENT command, for example—whichever is farther to the right).
Indentation on the right side, print offset changes, or margin changes
can change the location of change marks.
You should have at least two character positions available to the right
of a line (either the effective right end of the line or the right margin of
the page, whichever is farther to the right) to allow TFORM to print the
change mark. If no space is available, TFORM issues an error message
and doesn’t print the character.
11387 Tandem Computers Incorporated
3–15
Introduction to TFORM
COMMENT
The COMMENT command allows insertion of explanatory text in the input
file. The comments you enter don’t appear in the printed document.
What to Enter
\
 COMMENT 
 !
 [ text ]


Examples:
\COMMENT
Figure 13-3 is included to illustrate underlining.
\INDENT ON +5;
\!
COMMENT
Added indent is for the boxed note.
I set next text wide on purpose; be sure to keep \JOIN OFF
. . .described in Chapter 8.
\! Double-check this reference.
How to Use COMMENT
The two forms of the COMMENT command are similar in that they both
allow you to enter any commentary you want for documentation purposes.
Both of the COMMENT versions can appear anywhere in a line; the
difference is that the COMMENT version can only appear in command
lines with other commands. The \! version can appear in command or text
lines.
3–16
11387 Tandem Computers Incorporated
Introduction to TFORM
When you combine the COMMENT version on a command line and the
command comes after one or more commands, follow the rules of putting
multiple commands on a line the trigger character only appears in the first
column of the line, and semicolons separate the succeeding commands.
However, when you combine the \! version with text or other commands,
the trigger character always stays with the exclamation point when you
place this command on a text line or a command line (see the preceding
examples).
Tips
Any text to the right of the command is treated as part of the comment
and does not appear in the printed document.
When you combine several commands on a line and make the first one
a COMMENT (or \!) command, TFORM executes only the COMMENT
and treats the rest of the commands as commentary.
11387 Tandem Computers Incorporated
3–17
Introduction to TFORM
CONTENTS The CONTENTS command saves strings you include in it for printing in
the table of contents. You can also use this command to force printing of a
partial table of contents at the point where you enter the command.
What to Enter
\CONTENTS [ title ]
title
is a one-, two-, or three-field entity, depending on how you enter it. Its
syntax appears as
" [ text ] [ | [ text ] [ | [ text ] ] ] "
TFORM recognizes the vertical bars (|) as the field delimiters,
which divide the title into left, center, and right fields. TFORM leftjustifies any field to the left of the first delimiter (or if you omit both
delimiters), centers any field positioned between the vertical bars,
and right-justifies any field to the right of the second delimiter.
Fields may be empty or space-filled, and you can use any
combination of the one, two, or three fields. Enclose a title in
quotation marks.
Examples:
\CONTENTS "Part 3"
\CONTENTS "Part 3|Advanced TFORM|Page #"
\CONTENTS "||Part 3
Advanced TFORM"
\CONTENTS "Part 3||Advanced TFORM"
3–18
11387 Tandem Computers Incorporated
Introduction to TFORM
How to Use CONTENTS
As shown in the preceding examples, you can enter any combination of
one, two, or three fields in your title and separate them by the title field
delimiter—a vertical bar (|), or any other character you define—to produce
left-justified, centered, or right-justified titles on the printed page. In the
specific case of a two-field title, with neither field centered (see the fourth
example above), TFORM fills the space between the left and right fields
with a predefined fill string, repeated as many times as needed to fill the
space. The default fill string is a space-period ( .) combination. For any
other arrangement of fields, TFORM fills the output line to the left and/or
right of the specified field(s) with blanks.
TFORM normally prints the table of contents at the end of the document,
but you can force printing of the table at any time by entering a
CONTENTS command without a title . TFORM prints all of the contents
lines that have been generated—by CONTENTS commands and/or LEVEL
commands—up to that point. These content lines won’t be repeated in any
subsequent table of contents. The next table of contents begins with the first
item recorded after the partial table was printed.
Unless you make style changes, the table of contents—whether printed on
demand by a CONTENTS command or printed automatically at the end of
the file—uses the same page format as the rest of the document.
11387 Tandem Computers Incorporated
3–19
Introduction to TFORM
Tips
You can put any information in CONTENTS fields that you want, but
for a useful table of contents entry you must usually include the page
number symbol () in one of the fields if you want TFORM to include the
page number on which that entry appears. When TFORM finds the
CONTENTS command with such a symbol, it fills in the current page
number for you. Assume that TFORM finds the following command
when formatting page 36 of a document
\CONTENTS "Part 3|Advanced TFORM|Page #"
The contents page that TFORM prints would contain this entry
Part 3
Advanced TFORM
Page 36
Although you can use the CONTENTS command yourself to add
additional titles to the table of contents, the CONTENTS command is
also embedded in the LEVEL command. This means that all section
headings you provide for the LEVEL command are saved by
CONTENTS. If TFORM does not find a CONTENTS command forcing
a partial table of contents (which would be a CONTENTS command
with no title) within the file, TFORM automatically generates a table
of contents when it comes to the end of the file.
If you enter a CONTENTS command with no title and fail to precede
it with a NEW command, TFORM will include the partial table of
contents right at that point in the current page. On the other hand, you
might want to do this by using CONTENTS commands to collect a list
of topics, and then printing them as part of your text without having to
retype them.
3–20
11387 Tandem Computers Incorporated
Introduction to TFORM
DEFINE The DEFINE command defines the characters used to draw boxes, mark
changes, delineate title fields, overstrike other characters, and fill lines in
the table of contents. You can also use it to change the trigger character.
What to Enter

 TOP


BOTTOM
 SIDES LEFT


[
RIGHT]
 




["char"] 
BOX CORNERS TOP LEFT
RIGHT




 



BOTTOM LEFT

 RIGHT
 







\DEFINE 

 CHANGES [ "char" ]

 CONTENTS [ "string" ]
OVERSTRIKE [ "char" ]



[ "char" ]

 TITLE  FIELD
PAGENUMBER [ "char" ]




TRIGGER [ "char" ]


11387 Tandem Computers Incorporated
3–21
Introduction to TFORM
Examples:
\DEFINE BOX CORNERS TOP LEFT "$"
\DEFINE OVERSTRIKE "="
\DEF TITLE FIELD " "
\DEF TRIG "@"
How to Use DEFINE
The different options of the DEFINE command are described separately in
the following paragraphs.
DEFINE BOX Option
DEFINE BOX commands specify the characters used to create boxes.
You can customize the appearance of your boxes down to a single
corner.
DEFINE BOX TOP
This command defines the character used to create the top edge of a
box. The default is a hyphen (-).
DEFINE BOX BOTTOM
This command defines the character used to create the bottom edge
of a box. The default is a hyphen (-).
3–22
11387 Tandem Computers Incorporated
Introduction to TFORM
DEFINE BOX SIDES
This command names the character used to create the sides of a
box. If you specify SIDES without the LEFT or RIGHT modifiers,
the character you specify is used for both sides. Conversely, you
can make the sides different by specifying one character with a
DEFINE BOX SIDES LEFT and another character with the RIGHT
modifier. The default is a vertical line (|).
DEFINE BOX CORNERS
This command defines the characters that will appear in the corners
of your boxes. If you specify only DEFINE BOX CORNERS and a
certain character while omitting all the modifiers, TFORM uses the
character you specify for all four corners. Similarly, if you specify
CORNERS, along with TOP or BOTTOM, but omit both LEFT and
RIGHT, TFORM uses the same character for both corners of that
edge. To get a particular character in a particular corner, use the
full complement of modifiers and the character of your choice; for
example, DEFINE BOX CORNERS BOTTOM RIGHT “!”. The
default for the corner characters is a hyphen (-).
You can use any printable character, including a space, for any of
these positions. For example, you can create a three-sided box by
defining one edge with the character “ “.
DEFINE CHANGES Option
DEFINE CHANGES defines the character printed in the margin to
highlight text lines that differ from the preceding version of the
document (see the CHANGES command). Any printable character,
including a space, is acceptable. The default is a vertical line (|).
DEFINE CONTENTS Option
DEFINE CONTENTS establishes the character string that fills in the
space between the left-justified title and the right-justified page number
in a table of contents entry. TFORM repeats the string as many times as
needed to fill the gap. Any printable string is acceptable. The default is
a space-period ( .) combination.
11387 Tandem Computers Incorporated
3–23
Introduction to TFORM
DEFINE OVERSTRIKE Option
DEFINE OVERSTRIKE names the character to be printed over other
characters by the \OVERSTRIKE escape sequence. Any printable
character is acceptable. The default is a hyphen (-).
DEFINE TITLE Options
This option defines the characters used by TFORM when it formats the
different fields of a title.
DEFINE TITLE FIELD
DEFINE TITLE FIELD establishes the character used to separate the
three fields of a title. Any printable character is acceptable
except the one used as the page number character. The default is a
vertical line (|).
DEFINE TITLE PAGENUMBER
DEFINE TITLE PAGENUMBER specifies the character that
represents the position where TFORM is to place the current page
number in a title, typically in a FOOTER, HEADER, or
CONTENTS title field. You can use any printable character except
the one chosen for the field separator. The default is the number
symbol (#).
DEFINE TRIGGER Option
DEFINE TRIGGER specifies the character that identifies a TFORM
command or an escape sequence. This command doesn’t affect trigger
characters within already defined macros. The character can’t be a
blank, nor any of the escape characters used as metacharacters or in
rendition controls. These are
#-<>&!.()=
The default trigger is a backslash (\).
3–24
11387 Tandem Computers Incorporated
Introduction to TFORM
Tips
Although TFORM allows considerable freedom in redefining its control
characters, you should choose characters that are useful. A comma, for
example, is a poor choice as a trigger character because you use it
frequently in text.
Any DEFINE command that contains no replacement character or
string resets that character to its default. For example, if your
command is simply DEFINE BOX CORNERS TOP, TFORM resets both
top corner box characters to a hyphen. The command DEFINE BOX,
with no other modifiers present, resets all box characters; the command
DEFINE TITLE resets both the field separator and the page number
characters to their defaults.
The DEFINE command also causes a line break.
11387 Tandem Computers Incorporated
3–25
Introduction to TFORM
ENV You can use the ENV command to ontrol the environment (the system,
volume, and subvolume) in which TFORM operates. You can change any
or all of the default system, volume, or subvolume names TFORM normally
uses when it qualifies a file name you specify.
What to Enter
SYSTEM \system-name


\ENV
VOLUME $[volume-name

$volume-name.] subvol-name






˚
Examples:
\ENV SYSTEM \PRISM
\ENV VOL $PURPLE
\ENV VOLUME $PURPLE.COLORS
3–26
11387 Tandem Computers Incorporated
Introduction to TFORM
How to Use ENV
When you specify a file name with one of the FILE commands or a
SOURCE command and do not fully qualify it (provide the system name,
volume name, and subvolume name as well), TFORM automatically
expands the file name so it contains all four parts of a fully qualified
GUARDIAN 90 file name. By default, TFORM uses the names of the
default environment—the system, volume, and subvolume in effect when
you invoked TFORM—to expand a simple file name. If the file name is
located outside the default environment, use the ENV command to tell
TFORM how to expand the file name into a fully qualified GUARDIAN 90
file name.
ENV SYSTEM Option
ENV SYSTEM \system-name gives TFORM the system name for
subsequent expansion of the file name you specify.
ENV SYSTEM with no system-name resets the system name to
whatever name was in effect at the time you started TFORM.
ENV VOLUME Options
ENV VOLUME with no modifier resets the disc volume name and
subvolume name to whatever names were in effect at the time you
started TFORM.
ENV VOLUME $volume-name
This command gives TFORM the disc volume name for subsequent
expansion of the file name you specify.
ENV VOLUME $volume-name.subvolume-name
This command gives TFORM the volume name and subvolume
name for subsequent expansion of the file name you specify.
ENV VOLUME subvolume-name
This command gives TFORM the subvolume name for subsequent
expansion of the file name you specify.
11387 Tandem Computers Incorporated
3–27
Introduction to TFORM
Tips
When an ENV command contains a name, that name (system, disc
volume, or subvolume) must appear in a valid format and must
identify a currently available system, volume, or subvolume.
The defaults for the ENV command are the system, volume, and
subvolume in use when you invoked TFORM.
The ENV command can be especially useful when you use the SOURCE
command to read in a file from another location. If that file then reads
in other files from its own location, errors can result if the first file fails
to fully qualify the names of the files it reads. You can avoid “file not
found” errors by setting the environment to that of the first file before
sourcing it in.
3–28
11387 Tandem Computers Incorporated
Introduction to TFORM
ERROR
You can use the ERROR command to write an error message for a usersupplied macro, function, or construct.
What to Enter
\ERROR
string
Examples:
\ERROR "This printer requires a different DEVICE ^TYPE."
\ERROR "I couldn't find the requested file."
How to Use ERROR
If you are writing a macro, function, or construct (for example, an IF
construct at the beginning of your file), you can include one or more
ERROR commands to create messages that can be produced from within
the macro, function, or construct. These error messages are integrated into
the TFORM command error messages. You can write the error message so
it occurs when a bad argument is passed in the macro or function or when a
false condition in a conditional operation is found.
For example, you can write an IF construct that checks your parameter
device type against the class of device you use to print output. First, make
the IF condition true when the specified parameter device type does not
agree with the output device you normally use. Then include an ERROR
command in your IF construct to provide TFORM with the text of an error
message. When the IF condition is true—for example, the printer you want
to use does not correspond to the specified device type—TFORM can issue
an error message reminding you to change the parameter device type.
11387 Tandem Computers Incorporated
3–29
Introduction to TFORM
EXIT
The EXIT command stops TFORM.
What to Enter
\EXIT
How to Use EXIT
You are most likely to enter the EXIT command from the keyboard when
you are using TFORM interactively (control-Y has the same effect). You can
also include the command in a file if you want to stop formatting before
reaching the end of the file (if, for example, you included a number of lines
of file-history information at the end and didn’t want to precede each line
with a COMMENT command).
3–30
11387 Tandem Computers Incorporated
Introduction to TFORM
FILE The FILE command lets you manipulate from one to eight auxiliary edit
files. You can read from a maximum of four files (reading from a nameand-address file, for example, to produce customized form letters) and you
can write to a maximum of four files (writing out to a file you’ve created for
collecting index entries, for example).
What to Enter

READ
 
APPEND
OPEN file-name WRITE
 
[
PURGE ]

 

\FILE 
READ { filename | * } var [ ‚var ] ... 
 WRITE { filename | * } exp [ ‚exp ] ...
 CLOSE filename

˚
˚
filename
is a valid GUARDIAN 90 filename belonging to a file that is either an
EDIT file (file-code 101) or a T-TEXT file (file-code 102). It can be from
one to eight alphanumeric characters, the first being alphabetic.
*
for FILE READ, translates as “the input lines immediately following
this command”; for FILE WRITE, translates as “directly to the output
device.”
11387 Tandem Computers Incorporated
3–31
Introduction to TFORM
Examples:
\FILE OPEN MYTEXT WRITE APPEND
\FILE READ CLIENTS Title, First_Name, Last_Name, Address
\FILE WRITE INDEX "FILE Command, \(sys_pagenumber\)"
\FILE WRITE * "I can send this line verbatim to the printer."
How to Use FILE
The different options of the FILE command are described in the following
paragraphs.
FILE OPEN Options
FILE OPEN opens a file for either reading or writing. You use this
command to tell TFORM to open the auxiliary file you name so that
you can proceed to READ or WRITE to that file.
FILE OPEN filename READ
This command opens the named file as a read-only file. If four read
files are already open, TFORM issues an error message and ignores
the command to open any additional files.
FILE OPEN filename WRITE APPEND
This command opens the named file as a write-only file. If the
doesn’t exist, TFORM creates it. If it does exist, TFORM opens it,
moves to the last line of the file, and adds new records you write to
the end.
FILE OPEN filename WRITE with no modifier has the same effect
as FILE OPEN filename WRITE APPEND.
3–32
11387 Tandem Computers Incorporated
Introduction to TFORM
FILE OPEN filename WRITE PURGE
This command opens the specified file as a write-only file. If the
named file doesn’t exist, TFORM creates it. If it does exist, TFORM
purges it and opens a new file with that name.
FILE READ Option
FILE READ reads data from the specified file, assigning the contents of
one record to each variable listed in the READ command.
FILE READ filename var
This command reads as many lines from the named file as there are
variables in the command line, assigning the string value of each
line to the next variable in turn. If the FILE READ command
reaches the end of the file before filling all the variables, it assigns
the GUARDIAN 90 file system error “1” (end-of-file) to the system
variable SYS_FILEERROR and assigns an undefined value to each
remaining variable in the list.
If the specified file hasn’t been opened as a read-only file, the FILE
READ command assigns the appropriate GUARDIAN 90 file
system error number to SYS_FILEERROR and does nothing else.
These error codes are all defined in the System Procedure Errors and
Messages Manual.
FILE READ * var
This command reads as many lines from the current input file as
there are variables in the input list, assigning the string value of
each line to the next variable in turn. Normally, you would use
FILE READ * in a macro. If the FILE READ command reaches the
end of the file before filling all the variables, it assigns the
GUARDIAN 90 file system “end-of-file” error code to the system
variable SYS_FILEERROR and assigns an undefined value to each
remaining variable in the list. Note that no FILE OPEN command
is necessary, since the current input file is already open.
TFORM doesn’t send the lines read into variables to the printer as
well; it resumes normal formatted output with the line following
the last one read into a variable.
11387 Tandem Computers Incorporated
3–33
Introduction to TFORM
FILE WRITE Option
FILE WRITE outputs the value of each expression listed in the
command to a separate record (one EDIT line) in the specified file,
converting numeric values to strings before writing them.
FILE WRITE filename exp
This command writes one output record (one EDIT line) to the
named file for each expression in the output list. If an expression
has a numeric value, TFORM converts it to a string before writing
it. TFORM adds the edit lines to the end of the auxiliary file you
name in the command.
If the specified file hasn’t been opened as a write-only file, the FILE
WRITE command assigns the appropriate GUARDIAN 90 file
system error number to SYS_FILEERROR and does nothing else.
FILE WRITE * exp
This command writes each expression in the output list as an
output line to the output device, converting any numeric values to
strings in the process. Lines sent this way are strictly verbatim; that
is, neither the content nor the current line spacing is meaningful.
TFORM sends no line-feed or carriage-return information that
normally ends an output line, and doesn’t count such lines as part
of the text area. With this option you can send any data you wish,
including device-specific information (such as bit-map data), to the
printer without any interference by TFORM.
No FILE OPEN is necessary with the FILE WRITE * command,
since the output device is always open.
3–34
11387 Tandem Computers Incorporated
Introduction to TFORM
FILE CLOSE Option
You use the FILE CLOSE filename command to close the named
auxiliary file. You must issue separate FILE CLOSE commands for each
file you have opened. If the file was opened for writing, TFORM writes
an end-of-file mark before closing the file. If the file wasn’t open,
TFORM ignores the command.
This FILE WRITE series writes to a GLOSSARY file
\FILE
\FILE
\FILE
\FILE
\FILE
\FILE
OPEN GLOSSARY WRITE
WRITE GLOSSARY "Edit-type File"
WRITE GLOSSARY "Error Message"
WRITE GLOSSARY "Record"
WRITE GLOSSARY "Variable"
CLOSE GLOSSARY
This subsequent FILE READ series assigns string values from GLOSSARY
to the variables in the second command line
\FILE OPEN GLOSSARY READ
\FILE READ GLOSSARY a, b, c, d
\FILE CLOSE GLOSSARY
11387 Tandem Computers Incorporated
3–35
Introduction to TFORM
Tips
Four read files and four write files are the maximum number of
auxiliary files that can be open at one time.
With any FILE OPEN command, if four files are already open for
reading or writing, TFORM issues an error message and ignores the
command.
If you fail to supply a FILE CLOSE command, TFORM closes all files
that are open when it terminates.
You can add a simple IF construct to your file that will check for any
FILE command errors. TFORM can tell you when you use an incorrect
FILE READ or FILE WRITE command and what GUARDIAN 90 file
system error code the FILE command assigns to the SYS_FILEERROR
variable.
After a FILE OPEN and a FILE READ (or FILE WRITE) command, add
these three command lines
3
\IF SYS_FILEERROR<>0 1
\ ERROR "I found an error; its code is \(sys_fileerror\)"
\ENDIF 4
3–36
2
1
TFORM checks if SYS_FILEERROR has a value other than 0
2
Text of error message you provide for TFORM to use if value <>0
is found
3
SYS_FILEERROR variable for TFORM to evaluate, giving you the
error code
4
Terminates the IF construct
11387 Tandem Computers Incorporated
Introduction to TFORM
FOOTER The FOOTER command describes the structure and content of the footer
line or lines that may appear at the bottom of a page. You can have as
many as ten footers on a page (or as few as none, which is the default), and
you can define different footers for odd-numbered pages, even-numbered
pages, and the first page of a document.
What to Enter
\FOOTER

[

NOW ] [ int ]



FIRST
[ ALL ] ODD
EVEN






[ title ]
int
specifies which footer line, 1 through 10, is being defined. If you omit
int, TFORM assumes you are defining the topmost footer line (footer
line 1). Footer line 2 appears below footer line 1; footer line 10 is closest
to the bottom of the page.
title
is a one-, two-, or three-field entity, depending on how you enter it. Its
syntax appears as
" [ text ] [ | [ text ] [ | [ text ] ] ] "
TFORM recognizes the vertical bars (|) as the field delimiters,
which divide the title into left, center, and right fields. TFORM leftjustifies any field to the left of the first delimiter (or if you omit both
delimiters), centers any field positioned between the vertical bars,
and right-justifies any field to the right of the second delimiter.
Fields may be empty or space-filled, and you can use any
combination of the one, two, or three fields. Enclose a title in
quotation marks.
11387 Tandem Computers Incorporated
3–37
Introduction to TFORM
Examples:
\FOOTER FIRST " ** PRELIMINARY *** CONFIDENTIAL ** "
\FOOTER NOW "|THIS INSERT PAGE 13A FOLLOWS PAGE 13|"
\FOOTER 2 ALL ODD"|Writer
E. B. Roberts|page #"
\FOO EVEN "page #|Version 2, \sys_date\)|"
How to Use FOOTER
FOOTER FIRST Option
FIRST defines a footer that is to appear only on page number 1 of the
document (if the first page number is 27, for example, that might be the
first page but it’s not the FIRST page).
FOOTER ODD Option
ODD defines a footer that is to appear on pages 3, 5, 7, and so on, of the
document. If you want the same footer to appear on all odd-numbered
pages, including page 1, you should use FOOTER ALL ODD.
FOOTER EVEN Option
EVEN defines a footer that is to appear on even-numbered pages.
3–38
11387 Tandem Computers Incorporated
Introduction to TFORM
Keyword NOW
NOW specifies that the footer is to appear on the current page. If you
omit it, TFORM waits until the start of the next page to begin using the
specified footer. TFORM considers the start of a page to be the first text
it sees after reaching a page boundary.
You can use the keyword NOW with any of the options described here.
Note
Certain commands, such as SPACE and TITLE, produce text that is, TFORM sees a SPACE
or TITLE command as text on a page. So, for example, if there were a SPACE command
between a NEW command and a FOOTER command, the specified footer wouldn’t appear
until the following page unless the FOOTER command contained the keyword NOW.
Footers specified at the beginning of the file or before the start of the first
page take effect immediately.
Tips
A FOOTER command with no modifier (FIRST/ODD/EVEN) applies
to all pages.
If you want a footer to display the page number, put the number
symbol (#) in the appropriate field of title. (You can change the pagenumber symbol to another character with the DEFINE TITLE
PAGENUMBER command if you wish.)
If you want the footer to start adding the page numbers beginning at a
number other than 1, you can combine the PAGE and FOOTER
commands; for example
\PAGE 53
\FOOTER NOW ALL ODD "| | page #"
\FOOTER EVEN "page # | |"
The PAGE command sets the page counter. TFORM notes it and
continues to increment from the value you specify. The FOOTER
command picks up the page number from the TFORM page counter.
11387 Tandem Computers Incorporated
3–39
Introduction to TFORM
Although you don’t have to number footers consecutively, TFORM
does print them in numeric order (if you define footers 1 and 3, for
example, TFORM prints footer 3 right below footer 1).
If you want a blank footer, you must explicitly define it (for example,
FOOTER 2 “ || “). If you enter a FOOTER command with no title
TFORM eliminates that footer line, freeing up more space for text.
The first appearance of a FOOTER command or a HEADER command
(whichever comes first), even if blank, establishes the horizontal and
vertical pitch (whatever is in effect at the time) of all footers and
headers for the remainder of the document, even if pitch changes occur
in the text region.
TFORM always prints single-spaced footers, regardless of the interline
spacing in the text region of the page.
You can define each of the fields of a footer title in a separate
FOOTER command if you wish. Already defined fields in subsequent
commands must be empty; if a field contains a space, it wipes out the
previous field definition and replaces it with a space.
You can change any or all existing fields of a footer by entering a new
FOOTER command where you want the footer to change. The previous
string or strings in the title fields are replaced when TFORM finds a
new FOOTER command for an already defined footer. If you only want
to change one or two fields of the three, do not specify a space (or any
other character) for the other fields (see preceding tip). For example,
enter FOOTER “||NEWTEXT” to redefine just the third field of a
title.
The FOOTER command also causes a line break and signals the start of
a new paragraph.
To create a blank page with a header and a footer specify a SPACE
command on the first page. But to get the following pages to print with
headers and footers, either text must appear on those pages or you
must specify a SPACE command on each page.
3–40
11387 Tandem Computers Incorporated
Introduction to TFORM
FUNCTION
TFORM supplies users with a set of functions for evaluating expressions.
However, if you want to create your own function, you can use the set of
commands in the FUNCTION construct. As with a TFORM-supplied
function, you can use your function as part of an expression. When you call
the function in your text, it evaluates the expression, which returns a value,
which in turn is inserted into your text at that point.
A function is a group of commands that you define as a unit. You can refer
to it repeatedly within the main body of your document, and you can pass
up to 10 arguments to it so that its action can be dynamically altered.
You can change the structure of a function within your document by
appending lines to it. You can also delete the function during document
processing.
What to Enter
\FUNCTION function-name
 BEGIN [LOCAL var [‚ var]... ] 
 APPEND

DELETE


. . .
commands
. . .
\RETURN expression
. . .
commands
. . .
\ENDFUNCTION [ function-name ]
function-name
is a name that represents a FUNCTION construct. A function-name
can be no longer than 32 characters; it must begin with a letter; and the
remaining characters may be letters, numbers, and/or underscore (_)
characters. The name must be unique from all other function names.
11387 Tandem Computers Incorporated
3–41
Introduction to TFORM
How to Use the FUNCTION Construct
The FUNCTION construct is similar to the MACRO construct. Both
resemble subroutines; that is, they can accept and process arguments. The
FUNCTION construct, however, defines an expression and returns its
value. In addition, FUNCTION constructs cannot produce any lines of text.
The different commands of the FUNCTION construct are described in the
following paragraphs.
FUNCTION function-name BEGIN
This command defines a function with that given name. The
commands that follow, up to and including the associated
ENDFUNCTION command, constitute the body of the macro. You
must enter FUNCTION BEGIN by itself on an input line.
Because the purpose of a function is to return a value to be used in an
expression (rather than produce text), the only commands you can use
in a FUNCTION construct are ASSIGN, ERROR, and COMMENT
commands and those in the IF and LOOP constructs. TFORM returns
an error message if it finds other commands or text lines included
within the construct.
The function-name must be different from other names of TFORMsupplied functions and functions you define. You can abbreviate a
function-name, but this name must remain unique within its first
three characters. If the function-name is not unique, TFORM issues
an error message and ignores the function.
3–42
11387 Tandem Computers Incorporated
Introduction to TFORM
FUNCTION function-name BEGIN LOCAL
The keyword LOCAL in a FUNCTION BEGIN command specifies that
all of the variable names following it on a command line represent
entities that are used only within the range of the function. The range
of a function begins with the FUNCTION BEGIN command and ends
with the ENDFUNCTION command, and it includes the ranges of any
other functions that the current function might invoke. In other words,
the function and any function it invokes have access to local copies of
the specified variables and can alter their values without affecting any
variables that might have the same names elsewhere in the document.
Variables not modified with the keyword LOCAL have a global range,
and if the function changes them, they are changed wherever they
appear.
FUNCTION function-name APPEND
This command defines the beginning of a group of lines, up to the
corresponding ENDFUNCTION command, that are to be added to an
existing function with the specified name. If no such function exists,
APPEND has the same effect as BEGIN.
RETURN expression
The RETURN command serves two purposes (1) it immediately
terminates the execution of the function; and (2) it sets the value of the
function to the value of the expression in the RETURN command.
When the function has been executed, the value of the function replaces
the function reference at that point in the text (as with TFORM-supplied
functions). The RETURN command must be on a line of its own.
11387 Tandem Computers Incorporated
3–43
Introduction to TFORM
ENDFUNCTION function-name
This command defines the end of the function named in the
FUNCTION BEGIN command. It must be entered on its own line.
Using the function name is optional; however, if the name is specified,
it must match the name given in the FUNCTION function-name
BEGIN (or APPEND) command.
FUNCTION function-name DELETE
This command deletes the function with the specified name. You
would probably use this command to make way for another function
with the same name. If no such function exists, the command has no
effect. You must enter this command on its own line. It requires no
corresponding ENDFUNCTION command.
3–44
11387 Tandem Computers Incorporated
Introduction to TFORM
Tips
You neither abbreviate FUNCTION, RETURN, or ENDFUNCTION
commands nor combine them with other commands; each must be on a
line of its own.
Unlike macros, functions cannot create text lines and cannot produce
side effects such as turning the JOIN command ON or OFF.
You can put FUNCTION constructs anywhere you want in your
document, but you should group them together in one place. If you put
them in a separate file and read them in, several different documents
can share them.
You can abbreviate function-names, just as you abbreviate TFORMsupplied function, macro, and command names. For this reason, any
name you use must be unique within its first three characters. You can
use 1- and 2-letter names if you wish, but they can’t be abbreviated.
All the commands that make up a FUNCTION construct must be in a
single input file. You should, therefore, check that any FUNCTION
construct contained in a sourced-in file is both begun and ended in
that file.
For every FUNCTION BEGIN or FUNCTION APPEND command, you
must have a corresponding ENDFUNCTION command. If you put a
function-name in an ENDFUNCTION command, it must agree with
the name in the most recent FUNCTION BEGIN or FUNCTION
APPEND command.
In general, you should declare as LOCAL all variables that are relevant
only within the function.
See Appendix G for an example of a FUNCTION construct.
11387 Tandem Computers Incorporated
3–45
Introduction to TFORM
HEADER
The HEADER command describes the structure and content of the header
line or lines that may appear at the top of a page. You can have as many as
ten headers on a page (or as few as none, which is the default). You can
define different headers for odd-numbered pages, even-numbered pages,
and the first page of a document.
What to Enter
\HEADER

[

NOW ] [ int ]



FIRST
[ ALL ] ODD
EVEN






[ title ]
int
specifies which header line, 1 through 10, is being defined. If you omit
int, TFORM assumes you are defining the topmost header line (header
line 1). Header line 2 appears below header line 1; header line 10 is
farthest from the top of the page.
title
is a one-, two-, or three-field entity, depending on how you enter it. Its
syntax appears as
" [ text ] [ | [ text ] [ | [ text ] ] ] "
TFORM recognizes the vertical bars (|) as the field delimiters,
which divide the title into left, center, and right fields. TFORM leftjustifies any field to the left of the first delimiter (or if you omit both
delimiters), centers any field positioned between the vertical bars,
and right-justifies any field to the right of the second delimiter.
Fields may be empty or space-filled, and you can use any
combination of the one, two, or three fields. Enclose a title in
quotation marks.
3–46
11387 Tandem Computers Incorporated
Introduction to TFORM
Examples:
\HEADER FIRST "|*** THIS IS THE FINAL DRAFT ***|"
\HEADER NOW "INSERT THIS PAGE AFTER PAGE 27"
\HEADER ALL ODD "Page #||INTERNAL DRAFT"
\HEA EVEN "COMMENTS DUE JUNE 20th||"
How to Use HEADER
The different options of the HEADER command are described in the
following paragraphs.
HEADER FIRST Option
FIRST defines a header that is to appear only on page number 1 of the
document (if the first page number is 3, for example, that might be the
first page but it’s not the FIRST page).
HEADER ODD Option
ODD defines a header that is to appear on pages 3, 5, 7, and so on, of
the document. If you want the same header to appear on all oddnumbered pages, including page 1, you must add the keyword ALL.
The command is HEADER ALL ODD.
HEADER EVEN Option
EVEN defines a header that appears on even-numbered pages.
11387 Tandem Computers Incorporated
3–47
Introduction to TFORM
Keyword NOW
NOW specifies that the header is to appear on the current page. If you
omit it, TFORM waits until the start of the next page to begin using the
specified header. TFORM considers the start of a page to be You can
use the keyword NOW with any of the options described previously.
Note
Certain commands, such as SPACE and TITLE, produce text. If you put a SPACE
command, for example, between a NEW command and a HEADER command, the specified
header wouldn’t appear until the following page unless the command contained the keyword
NOW.
Headers specified at the beginning of the file or before the start of the first
page take effect immediately.
Tips
A HEADER command with no scope (FIRST/ODD/EVEN) applies to
all pages.
If you want a header to display the page number, put the number
symbol (#) in the appropriate field of title. (You can change the
page-number symbol to another character with the DEFINE TITLE
PAGENUMBER command if you wish.)
If you want the header to start adding the page numbers beginning at a
number other than 1, you can combine the PAGE and HEADER
commands. For example
\PAGE 53
\HEADER NOW ALL ODD "||page #"
\HEADER EVEN "page #||"
The PAGE command sets the page counter. TFORM notes it and
continues to increment from the value you specify. The HEADER
command picks up the page number from the TFORM page counter.
Although you don’t have to number headers consecutively, TFORM
does print them in numeric order (if you define headers 1 and 3,
TFORM prints header 3 right below header 1).
3–48
11387 Tandem Computers Incorporated
Introduction to TFORM
If you want a blank header, you must explicitly define it (for example,
HEADER 2 “ || “). If you enter a HEADER command with no title,
TFORM eliminates the header line, freeing up more room for text.
The first appearance of a HEADER command or a FOOTER command
(whichever comes first), even if blank, establishes the horizontal and
vertical pitch—whatever is in effect at the time—of all headers and
footers for the remainder of the document, even if pitch changes occur
in the text region.
TFORM always prints single-spaced headers, regardless of the interline
spacing in the text region of the page.
You can define each of the fields of a header title in a separate
HEADER command if you wish. Already defined fields in subsequent
commands must be empty; if a field contains a space, it wipes out the
previously defined field and replaces it with a space.
You can change any or all existing fields of a header by entering a new
HEADER command where you want the header to change. The
previous string or strings in the title fields are replaced when
TFORM finds a new HEADER command for an already-defined
header. If you only want to change one or two fields of the three, do
not specify a space (or any other character) for the other fields (see the
preceding tip). For example, enter HEADER “||NEWTEXT” to
redefine just the third field of a title.
The HEADER command also causes a line break and signals the start of
a new paragraph.
11387 Tandem Computers Incorporated
3–49
Introduction to TFORM
HELP The HELP command provides new and experienced users with detailed
assistance on several TFORM topics. These topics include the syntax of all
the TFORM commands, a summary table describing operators, and short
definitions of functions and system variables.
What to Enter
\HELP
The HELP Facility
Use the HELP facility interactively. Type TFORM, press RETURN, then
type \HELP at the “?” prompt. TFORM displays this screen:
\HELP
ALL [ COMMANDS ]
command-name

ESCAPES
OPERATORS

SYNTAX [ CONVENTIONS ]
DEFINE [ CHARS ]
SYSTEM
SYSTEM FUNCTIONS
PRINT [ FLAGS ] 
SYSTEM
SYSTEM SET [ FLAGS ]
SYSTEM VARIABLES

You may enter “help sys fun” instead of “HELP SYSTEM FUNCTIONS” or
similar abbreviations, as in other TFORM commands. There is a three
character minimum. To reference this facility from TEDIT, enter:
RUN TFORM \HELP ...
3–50
11387 Tandem Computers Incorporated
Introduction to TFORM
Examples:
\HELP FOOTER
\HELP SYN CONV
\HELP ALL
\HELP SYS PRINT FLAGS
How to Use HELP
The HELP command is a little different from most other commands, in that
you use HELP interactively (that is, you type TFORM at your command
interpreter to get a TFORM prompt, then ask TFORM for the HELP facility)
rather than use the HELP command in your file. The HELP facility is
designed to be used online as a reference when you need a quick review.
The different options of the HELP command are described in the following
paragraphs.
HELP command-name
You use this command to view the syntax of a particular command.
HELP ALL COMMANDS
This command displays a screen that lists all command names. Use this
command to help you locate the name or spelling of another TFORM
command, then use the command name and insert it into the HELP
command-name command, described above.
11387 Tandem Computers Incorporated
3–51
Introduction to TFORM
HELP ESCAPES
This command displays the syntax and use of TFORM escape
sequences (these sequences include metacharacters, rendition controls,
and indirection). When you tell TFORM to print a portion of text in
boldface or to overstrike a sentence, you must use an escape sequence
to set up such a request. Section 4 describes escape sequences in more
detail.
HELP OPERATORS
This command displays a table that summarizes the type, operation,
operand, and result relevant to each operator. Operators are discussed
in more detail in Section 5.
HELP SYNTAX CONVENTIONS
This command presents a list and definitions of the basic elements that
make up syntax descriptions. Users must be familiar with these
elements to be able to understand other HELP syntax summaries.
HELP SYSTEM DEFINE CHARACTERS
This command presents the user with a chart listing the characters of
SYS_CHARS, a string containing 13 characters that represent control
characters the user can change with the DEFINE command. You can
use SYS_CHARS to determine the current value of any of the characters
in the string.
HELP SYSTEM FUNCTIONS
This command presents short definitions of TFORM-supplied functions
you can use in expressions.
HELP SYSTEM PRINT FLAGS
This command presents the user with a chart listing the characters of
SYS_PRINTFLAGS, a string containing five characters that represent
flags set by the PRINT command. You can use the variable
SYS_PRINTFLAGS to determine if a particular PRINT command option
is ON or OFF.
3–52
11387 Tandem Computers Incorporated
Introduction to TFORM
HELP SYSTEM SET FLAGS
This command presents the user with a chart listing the characters of
SYS_SETFLAGS, a string containing 14 characters that represent flags
set by the SET command. You can use the variable SYS_SETFLAGS to
determine if a particular SET command option is ON or OFF.
HELP SYSTEM VARIABLES
This command presents short definitions of system variables that
TFORM creates and maintains. You can use these variables in
expressions. System variables are described in Section 5.
Tips
The charts provided by the HELP SYSTEM DEFINE CHARACTERS,
HELP SYSTEM PRINT, and HELP SYSTEM SET commands supply you
with the character strings that make up the SYS_CHARS,
SYS_PRINTFLAGS, and SYS_SETFLAGS variables. You can evaluate
these strings to determine the current values of the control characters
that can be changed by the DEFINE command and which command
options are ON in the PRINT and SET commands, respectively.
You can see that a command option is ON if the flag corresponding to
that option is a “1”; conversely, a “0” means the option is OFF. For
example, suppose you evaluate the eighth character of the
SYS_SETFLAGS string. As the chart shows, this string character
corresponds to the SET JOIN option of the SET command. If
SYS_SETFLAGS returns a “0,” the SET JOIN option is OFF.
11387 Tandem Computers Incorporated
3–53
Introduction to TFORM
You can evaluate the strings of the SYS_CHARS, SYS_SETFLAGS, and
SYS_PRINTFLAGS variables by using the STRING function. For
example
STRING(SYS_SETFLAGS,8,8)
will evaluate whether the option represented by the eighth character of
the SYS_SETFLAGS string—text joining by SET JOIN—is “1” or “0”
(ON or OFF). To evaluate more than one character of the string, you
can specify a range of characters. The following example shows how
the STRING function evaluates the fourth through the twelfth
characters of the SYS_SETFLAGS string.
STRING(SYS_SETFLAGS,4,12)
To evaluate the whole string, simply specify SYS_SETFLAGS within the
parentheses; the STRING function will return all the values of the
SYS_SETFLAGS string.
System variables and functions used to evaluate them are described in
more detail in Section 5.
Users may find that after they have learned TFORM, they can continue
to simply use the HELP facility from their text editor as an aid to
memory.
3–54
11387 Tandem Computers Incorporated
Introduction to TFORM
IF
An IF construct allows you to do conditional operations and formatting.
You build an IF construct with the following options
IF a condition is true, do something.
ORIF the first condition is false and another is true, do something else.
ELSE if none of the above are true, do something else entirely.
Finally, an ENDIF terminates the construct.
What to Enter
\IF exp
. . .
commands and/or text
. . .
[ \ORIF exp ]
. . .
commands and/or text
. . .
[ \ELSE ]
. . .
commands and/or text
. . .
\ENDIF
11387 Tandem Computers Incorporated
3–55
Introduction to TFORM
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.
3–56
11387 Tandem Computers Incorporated
Introduction to TFORM
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.
11387 Tandem Computers Incorporated
3–57
Introduction to TFORM
INDENT
You can use the INDENT command to temporarily change the left or right
margin, or both margins, from the locations defined by the most recent
STYLE MARGIN commands or other INDENT command. You can move
the margins inward toward the center or outward toward the edge of the
paper.
What to Enter
int
 LEFT  
  ONBLANK


 RIGHT


  COMMAND  BOTH  
\INDENT
[+|-] num [units]



 OFF  LEFT
RIGHT 

  BOTH 
int
specifies the number of input lines to be indented.
num
specifies the number of units to indent the affected input lines. If you
put a plus or minus sign before num, TFORM adds that amount to or
subtracts that amount from the existing indentation; if you omit the
sign, TFORM uses that amount as the actual indentation.
units
specifies the units of measurement used in the indentation; if you omit
it, TFORM assumes you mean CHARS.
3–58
11387 Tandem Computers Incorporated
Introduction to TFORM
Examples:
\INDENT 3 LEFT 5
\INDENT ON BOTH -2 PICA
\INDENT BLANK RIGHT 10
\IND OFF LEFT
How to Use INDENT
INDENT by itself, with no options or keywords at all, cancels all
indentation and returns both margins to their most recent STYLE MARGIN
settings.
The different options of the INDENT command are described separately in
the following paragraphs.
INDENT int
This command indents the next int input lines. INDENT with no
value for int indents the next input line only.
INDENT ON num
This command indents input lines until a corresponding INDENT OFF
appears.
INDENT BLANK num
This command indents input lines until the next blank line occurs.
INDENT COMMAND num
This command indents input lines until the next command line appears.
11387 Tandem Computers Incorporated
3–59
Introduction to TFORM
Keywords LEFT, RIGHT, and BOTH
You can further modify the INDENT commands with the keywords
LEFT, RIGHT, and BOTH. These keywords specify which margin you
want indented. If you do not specify any of them, TFORM assumes you
mean LEFT.
Values num and units
You need to include a value for num when you want to indent from the
margin. The value of num tells TFORM how many units to indent.
You can specify a positive or negative value for num, such as +3 PICA
or
–1 INCH, or a fractional value, such as 0.75 INCH or 2.54 CM. When it
processes the command, TFORM converts all measurements to
decipoints.
The value of units can be any of the standard TFORM units of
measurement (see Section 1). TFORM assumes CHARS if you do not
specify any value for units. If you use CHARS or LINES, which are
variable units, the actual amount of indentation depends on the current
pitch setting (set by TFORM or redefined with the SET PITCH
command).
INDENT OFF num
This command stops indentation started by the preceding INDENT
ON.
3–60
11387 Tandem Computers Incorporated
Introduction to TFORM
Tips
You must include num in INDENT commands that initiate indentation
so TFORM knows how much it’s supposed to indent, but you do not
need to include num in an INDENT OFF command. If you do, TFORM
turns off indentation and issues an error message as well (“TOKENS
AFTER COMMAND IGNORED”). Simply delete the num value if you
receive such an error message.
If you enter an INDENT OFF command without a preceding INDENT
ON command, TFORM issues an error message.
The scope of the INDENT command refers to input lines, not output
lines TFORM indents as many output lines as necessary to account for
the number of input lines you designate in an INDENT command.
To indent one, and only one, output line, use the TI (Temporary Indent)
command instead of the INDENT command. The only two restrictions
for using the TI command are that the command must be on a line by
itself and that it must be followed immediately on the next line by text.
INDENT OFF with no LEFT/RIGHT/BOTH keyword cancels only
LEFT indentation. You need to use an INDENT OFF RIGHT or
INDENT OFF BOTH command to remove right indentation.
11387 Tandem Computers Incorporated
3–61
Introduction to TFORM
KEEP
The KEEP command prevents TFORM from adding a page break in the
middle of text you want kept together. TFORM checks to see if there’s
enough room on the current page for the specified text input lines; if there
isn’t, TFORM forces a page break and begins printing the text on the next
page.
What to Enter
 ON
 OFF
 BLANK
COMMAND
int
\KEEP



Examples:
\KEEP 12
\KEEP ON
\KEEP COMMAND
How to Use KEEP
The different options of the KEEP command are described in the following
paragraphs.
KEEP int
This command tells TFORM to keep the next int input lines together
on the current page; if there isn’t room, TFORM forces a page break.
KEEP ON
KEEP ON keeps together all input lines between it and a corresponding
KEEP OFF command.
3–62
11387 Tandem Computers Incorporated
Introduction to TFORM
KEEP BLANK
This command keeps together all input lines between it and the next
blank line.
KEEP COMMAND
KEEP COMMAND keeps together all input lines between it and the
next command line.
Tips
The maximum number of lines that TFORM can keep together is one
page (the exact number depends on how you have defined your page).
TFORM treats any excess lines as though they weren’t included in the
KEEP command’s scope.
If you enter a KEEP OFF command without a preceding KEEP ON
command, TFORM issues an error message.
You mustn’t include any form of the NEW command within the scope
of a KEEP command. TFORM issues an error message and ignores the
NEW command.
The KEEP command also causes a line break.
11387 Tandem Computers Incorporated
3–63
Introduction to TFORM
LETTER
The LETTER macro package generates customized form letters. The
package consists of two macros the LETTER macro, which does the mailing
list processing, and the ADDRESS macro, which takes care of dating and
addressing each letter.
What to Enter
\LETTER body-file list-file
[date [top-space [addr-lines] ]]
body-file
is the GUARDIAN 90 file name of the file that contains the body of the
letter. TFORM assumes that it is an edit-format file and that it begins
with a salutation such as “Dear ...”.
list-file
is the GUARDIAN 90 file name of the file that contains the names,
addresses, and other information used in customizing the form letter.
The syntax for the list-file template block is described below.
date
is a string that LETTER uses as the date in the letter. If you omit it,
TFORM uses the current system-supplied date in TODAY LONG USA
format. You must enclose the string you supply for the date in
quotation marks, unless you are simply supplying a variable.
top-space
is a number that specifies how much space, in inches, LETTER will skip
at the top of the first page to allow for a preprinted letterhead. If you
omit it, LETTER allows two inches for the letterhead.
3–64
11387 Tandem Computers Incorporated
Introduction to TFORM
addr-lines
is an integer that specifies the minimum number of lines to be used for
the inside address. LETTER inserts blank lines following addresses that
contain fewer lines than this number. If you omit this parameter,
LETTER simply copies the address line for line and does not lengthen it
by inserting filler lines. However, one blank line always separates the
address from the salutation.
Note
Note the three options that follow the list-file argument of the LETTER command. If you
redefine the top-space and/or addr-lines options, you must also define any options that occur
to the left of those options. For example, you cannot specify a new addr lines value in a
command line without specifying values for date and top space as well, even if you do not
wish to change those values. TFORM will not realize you skipped over the options date and
top-space in the command line. In this case, enter either a new value or the default value for
all three options.
Examples:
\LETTER RESUME NULEADS "1 August 1986" 5
\LETTER EMPMEMO3 ALLEMPS "5/2/86" 2 5
\LETTER JOBQUERY CLIENTS "Second Quarter 1986"
11387 Tandem Computers Incorporated
3–65
Introduction to TFORM
How to Use LETTER
You include the LETTER command in the RUN command that starts
TFORM. Note that you specify no IN file
1
TFORM / OUT $S.#device/\LETTER body-file list-file; EXIT
1
You must include the backslash preceding the LETTER command
You must do two things to use the LETTER macro
1.
You must compose the body of your letter (the body-file), inserting
indirect variable names ( \(var\) ) at the points where you want
TFORM to insert particular words or phrases from a list file during the
processing of the letter.
2.
You must create a file of names and addresses (the list-file) to
which you want the letters sent, along with any other items you want
inserted in each letter to customize it. At the beginning of this file, you
put a template that associates the variable names in the body of the
letter with the entries in the list file. The following paragraphs discuss
this template in more detail below.
As stated in the syntax description, the list file must be an EDIT file. If you
use T-TEXT, you must create and edit your list file with the PROGRAM
MODE ON in the Create or Edit Document Menu.
The list file consists of blocks of data lines delineated by block separator
lines (which you can define). The first block is the template block, which
defines the variables used in the body of the letter and their relationship to
the data lines that follow in the list file. All remaining blocks contain the
names, addresses, and other items you want included in each letter.
LETTER processes the body file and the list file, producing one letter for
each set of personalizing data in the list file. LETTER sequentially inserts
each item from the list file into the body file where it finds an indirect
variable name, thus customizing the body of the letter.
3–66
11387 Tandem Computers Incorporated
Introduction to TFORM
When LETTER has processed the last set of data in the list file, TFORM
stops. (If you omit the EXIT command in the RUN command line, TFORM
enters the interactive mode at this point and gives you a “?” prompt. You
can then enter the EXIT command or a control-Y to end the TFORM run.)
The syntax for the list file template block is displayed below
< address-var > [ pattern ]
[ < salutation-var > ]
[ < var > ]
.
.
.
block-separator
address-var
is a variable name that identifies each line in the address section of a
data block. The first line in the address will be in address-var1, and
so on. You can use these variables in the body of your letter (the body
file). The angle brackets are required.
pattern
is one or more characters (not in quotes, unless you intend to use quotes
wherever the pattern appears) that signals the end of the address
section of a block. Exactly one space separates the pattern from the
closing angle bracket of the address variable identifier. The pattern
characters must be different from the block separator. If you omit it,
LETTER views a blank line in the file as separating address data from
other data.
salutation-var
is a variable name that holds the first item in the data block following
the address section, presumably the name to be used in the salutation.
If you don’t want a customized salutation, omit it from the template
block. The angle brackets are required.
11387 Tandem Computers Incorporated
3–67
Introduction to TFORM
var
represents variables inserted into the body file. The angle brackets are
required.
block-separator
is one or more characters (not in quotes, unless you intend to use quotes
wherever the block separator appears) that marks the end of each data
block in the list file; it also marks the end of the template block. It must
be different from the pattern, and must not contain a “<” character.
Using the ADDRESS Macro
At the beginning of your letter body file, just before the first line of text (the
salutation), you invoke the ADDRESS macro by simply saying
\ADDRESS
This macro puts the current date on the letter, right-justified and in the
format defined by the LETTER macro, followed by the inside address (two
blank lines separate the date and the address).
ADDRESS also sets up headers for subsequent pages of the letter. Such a
header consists of the name used in the salutation, left-justified; the date,
right-justified; and the page number (bracketed by hyphens), centered.
In addition, ADDRESS automatically selects bin 2 of the 5530 printer’s cutsheet feeder on the assumption that this bin contains letterhead paper for
the first page of the letter. If you’re not using the cut-sheet feeder, or if
you’re not using a 5530 letter-quality printer, TFORM prints all pages of the
letter on the paper available.
ADDRESS turns on joining and justification for optimum space
management in the letter. If you prefer a ragged right margin, enter a SET
JUSTIFY OFF command in the letter body-file following the salutation (after
ADDRESS has finished with the file). You should not turn off joining,
however, since a long variable item may overextend a line, causing a “line
too long” error.
3–68
11387 Tandem Computers Incorporated
Introduction to TFORM
LETTER appends numbers to the address variable name to identify the
individual lines of an address. If you use ADDRESS as the name, for
example, you can access individual address lines as variables anywhere in
the body of the letter by referring to \(ADDRESS1\), \(ADDRESS2\), and
so on. Data blocks can contain varying numbers of address lines, but never
less than one. If you want, that one line can be a blank line. This would tell
TFORM to simply omit printing any inside address.
The ADDRESS macro includes all of the address lines (lines that precede
the pattern in the data block) in the inside address; lines that follow the
pattern are items to be used later in the text of the letter.
Here’s an example of a letter body
\STYLE MARGIN TOP 1 INCH
\STYLE MARGIN LEFT 1 INCH
\STYLE MARGIN RIGHT 1 INCH
\ADDRESS
2
1
3
Dear \(nickname\),
3
The Hunt Club Breakfast was a smashing success! The \(amount\)
you contributed helped put us over the top. Now we can buy our own
radio-controlled stuffed fox on wheels, so that we can pursue our
avocation without interference from those environmentalists.
Gratefully,
1
These STYLE commands format the margins of the form letter.
2
This command calls the ADDRESS macro.
3
Indirect variables \(nickname\) and \(amount\) are embedded in
the letter body file.
11387 Tandem Computers Incorporated
3–69
Introduction to TFORM
The letter body file contains the TFORM commands that control the
formatting of the actual text of the letter, and it also contains variables
(enclosed in indirection escape sequences) that the list file uses when it
systematically inserts in the values for each. The list file that works with
the preceding body file looks like this
1
<address> =
<nickname>
2
<amount>
//
3
Throckmorton P. Gildersleeve
97 Wistful Vista
Suite 127
Upper Crust, NY 10513
=
Throcky
4
$500
//
Batton Barton Dursten III
1018 Sangazure Terrace
Tottering-on-the-Brink, NY 10515
=
Batty
4
$650
//
1
Pattern character
2
Salutation-var
3
Block separator
4
TFORM sequentially inserts these items for the indirect variables in
the body file.
LETTER generates separate letters for each block of data, which supplies
the text for each inside address, salutation, and amount of money
contributed. LETTER uses the lines that precede the equals sign (the
pattern, in this case) as the inside address, puts the next line (the
nickname) into the salutation where the variable nickname occurs, and
inserts the next line in place of the variable amount. In this example, the
double slash acts as the block separator.
3–70
11387 Tandem Computers Incorporated
Introduction to TFORM
LEVEL
LEVEL commands are actually invocations of the TFORM-supplied LEVEL
macro package, which you use to generate section headings for your
document.
What to Enter
0 title [int]
FORMAT int BEFORE int AFTER int PAGE ODD
EVEN
STYLE int
\LEVEL
CONTENTS
LEFT
CENTER
RIGHT
BOLD
NUMBER
...
UNDERLINE
UPSHIFT
ON | OFF
int
INDENT int1 int2 ... int11
LINES
int1 int2 ... int11
PAGESTRING string
REFERENCE var1 [ var2 ]
title
is a one-, two-, or three-field entity, depending on how you enter it. Its
syntax appears as
" [ text ] [ | [ text ] [ | [ text ] ] ] "
TFORM recognizes the vertical bars (|) as the field delimiters.
Fields may be empty or space-filled, and you can use any
combination of the one, two, or three fields. Enclose a title in
quotation marks.
11387 Tandem Computers Incorporated
3–71
Introduction to TFORM
string
is one or more characters enclosed in quotation marks.
int1 int2 ... int11
are the 11 integers that represent the 11 possible section levels in
the table of contents int1 represents the level 0 title, int2
represents the level 1 title, and so on.
var1
is a variable name you choose. When defined by a LEVEL
REFERENCE command, TFORM saves the current section number
in this variable and you can insert the saved number later in your
document.
var2
is a variable name you choose. When defined by a LEVEL
REFERENCE command, TFORM saves the current page number in
this variable and you can insert the saved number later in your
document.
Examples:
\LEVEL 0 "SECTION |4| TFORM Features for the 5530 Printer"
\LEVEL FORMAT 3 BEFORE 3 AFTER 1 PAGE
\LEVEL STYLE 1 CENTER BOLD UNDERLINE
\LEVEL REFERENCE SEC_NUM
3–72
11387 Tandem Computers Incorporated
Introduction to TFORM
How to Use LEVEL
The following paragraphs describe the different options of the LEVEL
command.
Specifying the Levels of Headings. You use the following command options to
specify the level of a heading. TFORM offers eleven levels of headings;
level 0, the highest level, has a different form than the lower-level headings.
LEVEL 0 title
This command defines a major section or chapter. You enter the section
type indicator (such as section, chapter, or appendix) in the leftmost
field of title. Enter the section designator (such as 1, B, or IV) in the
middle field of title. Enter the section title in the rightmost field. For
example,
\LEVEL 0 "Section|3|TFORM Commands"
You must enter all three fields (but any can be null or blank-filled).
TFORM joins the first and second fields, with one space between them,
and prints them on one line. TFORM then uses the format and style
defined by the LEVEL FORMAT 0 and LEVEL STYLE 0 commands to
print the section title (see the following descriptions of the FORMAT
and STYLE options). TFORM prints the third field on a separate line.
An optional integer following the title in the LEVEL 0 command
specifies how many blank lines are to separate the two title lines. The
default is zero.
11387 Tandem Computers Incorporated
3–73
Introduction to TFORM
TFORM saves the section designator in the system variable
SYS_SECTION_NUM, where you can access it. TFORM saves the
section title in the system variable SYS_LEVEL0_TITLE. Here are two
ways in which you can use these values
\HEADER 1 "||\\(sys_level0_title\\)"
\FOOTER "||\\(sys_section_num\\)-#"
Use of the “\\(exp\\)” double indirection escape sequence is
described in detail in Section 4.
LEVEL int string
A LEVEL int command defines a level 1 through level 10 section
heading. Each of the LEVEL 1 through LEVEL 10 commands takes a
string as the text for the heading. TFORM prints the string at the point
where the LEVEL int command appears, in the format and style
defined by the LEVEL FORMAT int and LEVEL STYLE int
commands.
TFORM saves the string in the SYS_LEVELn_TITLE system variable
(where n is the same number as that of the LEVEL command) for your
use. An example of such a LEVEL command is
\LEVEL 2 "The ASSIGN Command"
You must enter LEVEL commands in descending order. You mustn’t
enter a LEVEL 3 command, for example, without at least one LEVEL 1
and at least one LEVEL 2 command preceding it. (LEVEL 0 commands
needn’t be present, however.)
LEVEL FORMAT
The LEVEL FORMAT commands control the format TFORM uses to
print section headings. The following paragraphs describe the different
modifiers of the LEVEL FORMAT command.
3–74
11387 Tandem Computers Incorporated
Introduction to TFORM
LEVEL FORMAT int
LEVEL FORMAT int defines the format in which you want
TFORM to print the section title for a level int section.
BEFORE int
The BEFORE int modifier specifies the number of blank lines you
want TFORM to provide before printing the section title. If the
section happens to fall at a page break, TFORM doesn’t provide
those lines (thus avoiding excessive white space at the top of a
page). If you want those blank lines to appear, insert a SPACE
command, which TFORM always obeys.
AFTER int
The AFTER int modifier specifies the number of blank lines
TFORM is to provide after printing the section title. If you enter a
number less than zero, TFORM prints a “run-in” heading; the
format of such a heading is the title, then a period and two blanks,
and finally the first sentence of the section text.
PAGE ODD
The PAGE modifier specifies that the section is to begin on a new
page. The optional ODD argument forces the new page to be odd,
causing TFORM to increment the page counter accordingly and to
eject a blank page if necessary. If you use the PAGE option and
specify a BEFORE spacing of zero, the section begins at the top of
the page; if you combine a BEFORE int command with a value
greater than zero and the PAGE option as well, the section starts
int lines down from the top of the page.
11387 Tandem Computers Incorporated
3–75
Introduction to TFORM
PAGE EVEN
This command works exactly as the PAGE ODD command, except
that the EVEN argument causes TFORM to start a new page on an
even page.
If you fail to specify one or more format modifiers in a LEVEL
FORMAT command, or omit the command entirely for a given
level, TFORM uses appropriate default values. The defaults are
summarized in Table 3-1.
Table 3-1.
LEVEL FORMAT Default Values
Level
Format
0
1
2
3
4-10
BEFORE 10
BEFORE 0
BEFORE 3
BEFORE 2
BEFORE 1
AFTER 2
AFTER 1
AFTER 1
AFTER 0
AFTER –1
PAGE ODD
PAGE
Note that the defaults for levels 4 through 10 are the same. You can
set them to different values by modifying the LEVEL FORMAT
command for the level you want to use.
If you want to reset the values of all LEVEL FORMAT commands
to their defaults, you can type LEVEL FORMAT. If you just want to
reset the value of one LEVEL FORMAT command, enter LEVEL
FORMAT int . The specified FORMAT level is then reset to its
default.
3–76
11387 Tandem Computers Incorporated
Introduction to TFORM
LEVEL STYLE Options
The LEVEL STYLE commands control the style in which TFORM prints
section headings.
LEVEL STYLE int
LEVEL STYLE int defines the style in which you want TFORM to
print the section title for a level int section. You must enter either
the LEFT, CENTER, or RIGHT modifier.
LEVEL STYLE int LEFT
The LEFT modifier tells TFORM to print the section title leftjustified.
LEVEL STYLE int CENTER
The CENTER modifier tells TFORM to print the section title
centered on the page.
TFORM has a special centering feature built in for a LEVEL 0 head,
with certain conditions the current line length and the length of
the first line of the title is even, and the length of the second line of
the title is odd (or the reverse—odd, then even). As a special
feature, TFORM adds a required blank space to the end of the
second line. This addition causes the second line to move to the left
by one character when it is centered, thus aligning with the line
above it. Note, however, that the required blank space does not
appear in titles in the table of contents or in the section title
variable, SYS_LEVEL0_TITLE.
If you are using a 5530 printer, the title will not shift to the left by
an entire character width because of the micro spacing capability of
that printer. However, since TFORM always adds a required blank
character under the conditions described above, a LEVEL 0 title
printed on a 5530 is shifted slightly to the left, aligning with the
first line.
11387 Tandem Computers Incorporated
3–77
Introduction to TFORM
LEVEL STYLE int RIGHT
The RIGHT modifier tells TFORM to print the section title rightjustified.
LEVEL STYLE Keywords
The BOLD, NUMBER, UNDERLINE, and UPSHIFT keywords
determine whether the title appears in boldface, numbered, underlined,
or in all capital letters, respectively. You can specify any combination
of these keywords, such as UPSHIFT UNDERLINE or BOLD UPSHIFT,
to produce your title in the style you prefer. TFORM will only use the
keywords you list to style the specified level of head.
If you specify NUMBER, TFORM automatically numbers the sections as
they appear and prints those numbers as part of the section titles. If
you’ve issued a LEVEL 0 command, and you’ve included a section
designator, TFORM starts each section number with that numeral (or
letter). Otherwise, TFORM begins numbering with the first level 1
section.
TFORM assigns the number 1.0 (n.1.0, if you’ve specified the level 0
section number as n) to the first level 1 section that appears; the next
level 1 section is 2.0, and so on. The first level 2 section within the first
level 1 section is number 1.1, the next is 1.2, and so on. This numbering
scheme continues down to level 10 (1.1.1.1.1.1.1.1.1.2). When a new
higher-level section appears, TFORM assigns to it the next number for
that section level and restarts numbering of lower-level sections at 1.
If you omit all keywords from a LEVEL STYLE int command, or enter
LEVEL STYLE with no command options, TFORM uses appropriate
default values for the specified level or all levels, respectively. The
defaults are summarized in Table 3-2.
3–78
11387 Tandem Computers Incorporated
Introduction to TFORM
Table 3-2.
LEVEL STYLE Default Values
Level
Style
0
1
2
3
4-10
(all fields) CENTER BOLD UPSHIFT UNDERLINE
LEFT NUMBER BOLD UPSHIFT UNDERLINE
LEFT NUMBER BOLD UPSHIFT
LEFT NUMBER BOLD
LEFT NUMBER
Note that the defaults for levels 4 through 10 are the same. You can set
them to different values by modifying the LEVEL STYLE command for
the level you want to use.
If you want to reset the values of all LEVEL STYLE commands to their
defaults, you can type LEVEL STYLE. If you just want to reset the
value of one LEVEL STYLE command, enter LEVEL STYLE int . The
specified STYLE level is then reset to its default.
LEVEL CONTENTS Options
Whenever you use a LEVEL int command, TFORM stores the section
title (and the section number, if you’re using the numbering feature) for
inclusion in the table of contents. The LEVEL CONTENTS commands
control the format of the table of contents.
LEVEL CONTENTS ON
This command lets you control whether TFORM should collect
table of contents data. To get a partial table of contents, you can
turn the data collection on and off at various points in the input file.
The default is LEVEL CONTENTS ON.
LEVEL CONTENTS OFF
This command turns off the data collection feature for the table of
contents.
11387 Tandem Computers Incorporated
3–79
Introduction to TFORM
LEVEL CONTENTS int
This command specifies the lowest-level section that is to be
included in the table of contents. If int is 2, for example, level 3
through level 10 titles don’t appear in the table.
LEVEL CONTENTS INDENT int
This command specifies the indentation in characters for each
section level in the table. You can enter up to 11 values in this
command to define the indentation for all included levels. TFORM
measures all indentation from the left margin.
LEVEL CONTENTS LINES int
This command specifies the number of blank lines you want
TFORM to insert in the table of contents preceding each section
entry for a given level. You can enter up to 11 values in this
command to define the spacing for all included levels.
LEVEL CONTENTS PAGESTRING string
This command lets you define a string that you want TFORM to
place in the table of contents just before the page number for each
entry. You could specify the document section number and a
hyphen, for example; you could also let TFORM do the same thing
automatically with
LEVEL CONTENTS PAGESTRING "\\(sys_section_num\\)-"
Use of the “\\(exp\\)” escape sequence with double indirection is
explained in detail in Section 4.
For each LEVEL CONTENTS specification that you do not enter,
TFORM supplies a default value. The defaults are summarized
below in Table 3-3.
3–80
11387 Tandem Computers Incorporated
Introduction to TFORM
Table 3-3.
LEVEL CONTENTS Default Values
LEVEL CONTENTS ON
LEVEL CONTENTS 4
LEVEL CONTENTS INDENT 0 0 3 5 7 9 11 13 15 17 19
LEVEL CONTENTS LINES 1 0 0 0 0 0 0 0 0 0 0
LEVEL CONTENTS PAGESTRING “"
These defaults tell TFORM to:
Include all section headings from levels (0 through 4) in the
table of contents
Include level 4 headings as the lowest level of heading in the
table of contents
Aligns level 0 headings on the left margin and increases the
indents on each succeeding head by 2 characters
Insert one blank line before each level 0 heading and single
space all others
Print page numbers without any preceding string
LEVEL REFERENCE Option
The LEVEL REFERENCE commands let you save the current section
heading number in a variable so that you can refer to it later. LEVEL
REFERENCE SEC_NUM, for example, saves the current section
number in the variable SEC_NUM. If you include the second, optional
variable PAGE_NUM, TFORM saves the current page number in that
variable (for example, LEVEL REFERENCE SEC_NUM PAGE_NUM).
Later, you can include in your text a reference something like
...see Section \(SEC_NUM\), page \(PAGE_NUM\), for details...
and TFORM inserts the saved strings. Note that you can only have
references that refer back to items previously saved by LEVEL
REFERENCE commands.
11387 Tandem Computers Incorporated
3–81
Introduction to TFORM
Tips
The LEVEL CONTENTS OFF command turns off data collection by
issuing a LEVEL CONTENTS –1 command, which simply makes all
levels of headings ineligible for inclusion in the table of contents. If you
subsequently issue a LEVEL CONTENTS int command with a higher
number, you turn data collection back on again.
The LEVEL macro remembers the inclusion level in effect at the time it
sees a LEVEL CONTENTS OFF command, so it can reinstate that value
if you enter a subsequent LEVEL CONTENTS ON command. If in the
meantime you issue a LEVEL CONTENTS int command, the number
you specify won’t be in effect after the later LEVEL CONTENTS ON
command; TFORM uses the original inclusion level instead.
3–82
11387 Tandem Computers Incorporated
Introduction to TFORM
LIST LIST commands are invocations of the LIST macro package. They allow
you to produce lists of various kinds. A list is a series of items (words,
phrases, sentences, or paragraphs) linked together by a common ordering
format. A list can be nested within another list of the same or a different
type. TFORM provides ways for generating alphabetically ordered lists,
numerically sequenced lists, bulleted lists, and lists in other formats that
you define.
What to Enter
ALPHABETIC  UPPER
 LOWER 

[ BULLET ]   
\BEGIN LIST [list-name] NUMERIC
ROMAN UPPER [keywords]
 STYLE[expLOWER] 


\ITEM [ exp ] [ STYLE exp ]
\END LIST [ list-name ]
list-name
is an identifying name not more than 32 characters in length. It can
contain letters, numerals, and the underscore (_) character. The first
character must be a letter.
keywords
are any one or more of the following
GAP exp
LEFTINDENT exp
RIGHTINDENT exp
11387 Tandem Computers Incorporated
WIDTH exp
FORMAT string
3–83
Introduction to TFORM
exp
must have an integer value.
string
must be one or more characters enclosed in quotation marks.
Examples:
\BEGIN LIST PACIFIC_ISLANDS ALPHABETIC
\BEGIN LIST ROMAN UPPER GAP 2
1
\BEGIN LIST STYLE "CATEGORY \\(sys_lnum\\)" WIDTH 13
WIDTH is defined as 13 characters to accommodate the label plus 2 blank
spaces that will separate the label from the item body.
1
TFORM uses the variable \(sys_lnum\) to increment by 1 the
number portion of this label every time it is called.
1
\BEGIN LIST NUMERIC FORMAT "(?)
1
"
TFORM replaces the question mark with a numeral (since a
NUMERIC list was requested).
TFORM uses the two extra spaces following the closing parenthesis as a
two-space gutter between the label and the body of the item.
3–84
11387 Tandem Computers Incorporated
Introduction to TFORM
How to Use LIST
Each item in a list has two parts the label and the body of the item. The
label is defined by the type of list; for example, the label can be a bullet, a
numeral, or one or more words. The label sits to the left of the body of the
item, which is indented from the left margin by the width of the label
(though you can change this label width). The body is generally descriptive
text, but you can set up the body of the item any way you want.
TFORM separates list items vertically by a gap (one line, by default, or
however many lines you define) and indents entire items (including labels)
on the left and/or right sides by the number of characters you define.
The LIST macro package has three commands
1.
The BEGIN LIST command defines the beginning of a list. With an
optional keyword, you can specify the type of list you wish to build.
2.
The END LIST command defines the end of a list.
3.
The ITEM command designates both parts of each item in a list. It
designates the label (determined by the list type in the BEGIN LIST
command or specifically by an expression you enter after the
command) and the body of the item. You begin entering the body of an
item on the line below the ITEM command line.
11387 Tandem Computers Incorporated
3–85
Introduction to TFORM
The following paragraphs describe the different options of the BEGIN LIST,
END LIST, and ITEM commands of the LIST macro package.
BEGIN LIST
The BEGIN LIST command defines the ordering format of the list and
optionally assigns a name to the list for documentation convenience.
(When you have numerous lists, and especially when lists are nested,
names can be helpful in keeping track of individual lists). If you
include a list name, it must conform to the standard rules for variable
names and must not be any of the other words that can follow BEGIN
LIST (BULLET or ROMAN, for example). You do not need to include
the list name in the END LIST command, but it can help you to start
and end the various lists correctly. TFORM issues an error message
when the list names in corresponding BEGIN LIST and END LIST
commands do not match (perhaps due to a typographical error or an
incorrect list name in one of the two commands).
The BEGIN LIST command can also specify options that define the
structure of list items. These different options are described in the
following paragraphs.
3–86
11387 Tandem Computers Incorporated
Introduction to TFORM
BEGIN LIST ALPHABETIC
BEGIN LIST ALPHABETIC and BEGIN LIST ALPHABETIC
LOWER have the same effect They define an alphabetic list with
lowercase letters as labels. TFORM prints a label of the form “a. “
for the first list item, “b. “ for the next item, and so on (not
including quotation marks). TFORM indents each list item by 4
spaces.
BEGIN LIST ALPHABETIC UPPER produces an alphabetic list
with uppercase letters.
If an alphabetic list exceeds 26 items, TFORM labels the item after
“z” with “aa”; the next item is “ab,” and so on (in an uppercase list,
“AA” follows “Z,” and so on). This labeling causes the first line of
text to be pushed one space to the right; TFORM still indents the
remainder of the item 4 spaces, however. If this is unacceptable (or
if you have more than 100 items in your list), you can use the
FORMAT keyword or the STYLE form of the BEGIN LIST
command with the WIDTH keyword to define a wider label.
BEGIN LIST BULLET
BEGIN LIST BULLET starts a bulleted list. TFORM begins each
item with a label of the form “• ” (not including the quotation
marks) and indents the list item 3 spaces.
If you don’t enter any list type option, TFORM builds a bulleted list
by default.
BEGIN LIST NUMERIC
BEGIN LIST NUMERIC defines a numbered list. TFORM prints a
label of the form “1. ” for the first item, “2. ” for the next, and so on
(not including quotation marks), indenting each item 5 spaces. For
numbers greater than 9, TFORM pushes the first line of text one
space to the right to make room for each 2-digit label, but continues
to indent the remainder of each item 4 spaces. If this is
unacceptable (or if your list contains 100 or more items), you can
use the FORMAT keyword or the STYLE form of the BEGIN LIST
command with the WIDTH option to define a wider label.
11387 Tandem Computers Incorporated
3–87
Introduction to TFORM
BEGIN LIST ROMAN
BEGIN LIST ROMAN and BEGIN LIST ROMAN UPPER have the
same effect TFORM puts a 7-character label in front of each item,
indenting the body of the item accordingly. The labels are of the
form “I.”, “II.”, “III.”, and so on (not including quotation marks).
Note that the Roman numerals expand to the left in the label area,
remaining fixed in relation to the text that follows.
BEGIN LIST ROMAN LOWER defines a list of the same form, but
with lowercase Roman numerals.
The widest number that can be expressed in a 7-character space is
XVII (17). For wider numbers, TFORM pushes the first line of text
an appropriate number of spaces to the right, while continuing to
indent the remainder of the item 7 spaces. You can use the WIDTH
option to get a Roman-numeral list with wider labels.
BEGIN LIST STYLE
BEGIN LIST STYLE exp creates a descriptive list, one in which the
value of an expression determines the appearance of the label. The
string expression defines the form of the label that precedes each
item. Two predefined system variables—SYS_LNUM and
SYS_LDESC—are available for use in descriptive lists.
1. TFORM sets the value of SYS_LNUM to zero when it encounters
a BEGIN LIST STYLE command containing this variable, then
increments the variable by 1 each time it sees an ITEM command.
A practical example of using this variable is to have TFORM take
care of customized numbering of list items.
3–88
11387 Tandem Computers Incorporated
Introduction to TFORM
For example, to create a list with numbering incremented by a
factor other than 1, your commands would be similar to these
\BEGIN LIST STYLE 10*SYS_LNUM
\ITEM
body of item for point 10
\ITEM
body of item for point 20
\ITEM
body of item for point 30
TFORM multiplies the variable by 10 and creates customized
numeric labels for your list.
If you combine the SYS_LNUM variable (a numeric entity) with one
or more string entities (for example, to make sequentially
numbered textual labels), you must convert SYS_LNUM from a
numeric to a string entity if the variable is not part of a string
expression (enclosed in quotation marks). See the “Tips” at the end
of the LIST discussion for more details.
2. SYS_LDESC references a string exp that you specify in an ITEM
command. TFORM substitutes the string exp of an ITEM
command into the SYS_LDESC variable in a BEGIN LIST STYLE
command. This saves you keystrokes and adds a measure of
consistency when you need to insert changing string expressions
into a standard list format.
For example, to create descriptive labels for a series of list items,
use the SYS_LDESC variable with the BEGIN LIST STYLE
command
\BEGIN LIST STYLE
\ITEM "Jupiter"
body of the item,
\ITEM "Saturn"
body of the item,
\ITEM "Uranus"
body of the item,
SYS_LDESC WIDTH 9
a description of Jupiter
a description of Saturn
a description of Uranus
11387 Tandem Computers Incorporated
3–89
Introduction to TFORM
TFORM uses the value in each ITEM command and substitutes it in
turn for the SYS_LDESC in the BEGIN LIST STYLE command. Each
item is now a label in your descriptive list and would print like this
Jupiter body of the item, a description of Jupiter
Saturn body of the item, a description of Saturn
Uranus body of the item, a description of Uranus
BEGIN LIST keywords
GAP exp
LEFTINDENT exp
RIGHTINDENT exp
WIDTH exp
FORMAT string
GAP exp
GAP exp specifies the number of blank lines that separate list
items. The default is 1. This applies only to spacing between items
of the same level. For example, if an item is followed by a BEGIN
LIST command for a nested list, TFORM doesn’t automatically
insert a gap between the item and the start of the second list.
LEFTINDENT exp
LEFTINDENT exp specifies the number of characters to indent the
entire list, including the label, from the current left margin. For an
independent list, the default is zero; for a nested list, the default is
the width of the next outer list’s label.
RIGHTINDENT exp
If you want to indent the right edge of the list, use RIGHTINDENT
exp option. The default is zero.
WIDTH exp
WIDTH exp defines the width of the label portion of a list item;
that is, the amount of space that the text portion is to be indented.
This keyword is especially useful for descriptive lists; you should
set it to the number of characters in the widest descriptor (including
any blanks that are to separate the label from the first line of text).
3–90
11387 Tandem Computers Incorporated
Introduction to TFORM
FORMAT string
The FORMAT option provides you with an alternate way to modify
labels for standard list items. Instead of using the BEGIN LIST
STYLE feature, you specify the list type and customize the label for
that list type with the FORMAT option.
The FORMAT string is a “picture” that defines what you want
the label to look like. A question mark in the string in the
command line represents the portion that TFORM must compute.
To generate each list item’s label, TFORM
1. Copies the FORMAT string characters, up to the question mark,
to begin the label
2. Inserts the standard LIST expression or the value of the STYLE
expression (defined by the user) in place of the question mark
3. Copies the remaining FORMAT string characters to the label to
complete it
For example, if you prefer parentheses around each letter in an
alphabetic list rather than the standard period, you can use the
following command
\BEGIN LIST ALPHABETIC FORMAT "(?)
"
TFORM can use the new format you provide to build the labels of the
ALPHABETIC list; the list items will print like this
(a)
(b)
...
text of item 1
text of item 2
...
Note the two blank spaces included in the string. These spaces provide a
2-space gutter to separate the label from the body of the list item. You can
also vary the number of spaces or omit them.
11387 Tandem Computers Incorporated
3–91
Introduction to TFORM
To redefine the bullet as another character (for example, a “>>”), simply
enter
\BEGIN LIST BULLET FORMAT ">>
"
If you do not specify a FORMAT string, TFORM supplies the default
FORMAT string for the specified list type; the label of the list type appears
in its standard format or, if one is provided, with a STYLE exp.
ITEM
ITEM signals the start of each new item (including the first) in a list. In
the case of descriptive lists, it also supplies the descriptor for the label
(refer back to the BEGIN LIST STYLE discussion above); if you don’t
include a string expression, TFORM uses a null string for the label
(unless the expression in the BEGIN LIST STYLE command supplies a
string). No string expression is necessary for any other type of list.
An ITEM command can have a STYLE exp modifier in addition to, or
instead of, the usual string expression in a descriptive list. In this case,
the string expression you enter here overrides the label structure
defined by the style expression in the BEGIN LIST STYLE command.
For example, you can use it to make an item deviate from a standard
numeric sequence (1, 2, 2.1, 2.2, 3, and so on).
You must precede every list item with an ITEM command.
END LIST
END LIST signals the end of a list. For every BEGIN LIST, you must
have a corresponding END LIST.
An END LIST command corresponds to the most recent BEGIN LIST
command. If you put a list name in a BEGIN LIST command for
documentation convenience and include it as well in the corresponding
END LIST command, the list names must be the same name. If they
aren’t, TFORM reports an error (but ends the list anyway). TFORM
accepts a simple END LIST even if you include a list name in the
corresponding BEGIN LIST command.
3–92
11387 Tandem Computers Incorporated
Introduction to TFORM
Tips
Recall that characters enclosed within quotation marks represent a
string to TFORM. Thus, TFORM can convert any system variable
occurring within quotation marks to a string entity. When you use the
BEGIN LIST STYLE command and the two variables SYS_LNUM and
SYS_LDESC together, you are combining a numeric entity and a string
entity. If both variables occur in the command line and SYS_LNUM is
not contained as part of a string expression, you must convert
SYS_LNUM to a string entity so TFORM can process them together.
There are two ways to convert SYS_LNUM to a string. One way is to
use the STRING function to evaluate the SYS_LNUM variable. TFORM
returns a single value for the SYS_LNUM variable in the form of a
string. The STRING function is discussed in Section 5.
The second way to convert SYS_LNUM to a string entity is with an
indirection escape sequence, which works similarly to the STRING
function; it evaluates an expression and indirectly represents that
expression as a string value. Indirection is discussed in more detail in
Section 4.
Remember that you can use SYS_LNUM by itself as a general
expression with no conversion; for example, BEGIN LIST STYLE
10*SYS_LNUM defines a list with the labels 10, 20, 30, and so on.
11387 Tandem Computers Incorporated
3–93
Introduction to TFORM
LOOP
The LOOP construct lets you perform repeated actions such as executing
the same commands and/or writing the same text the number of times you
specify. The LOOP construct also has command options for immediate
restarting or immediate termination of the loop.
What to Enter
\LOOP [ exp ]
. . .
commands and/or text
. . .
[ \NEXTLOOP ]
. . .
commands and/or text
. . .
[ \EXITLOOP ]
. . .
commands and/or text
. . .
\ENDLOOP
Examples:
A simple application of the LOOP construct is to create a space for a piece
of art. In this example, the text, FIG.2_HERE is printed 12 times, once on
each line.
\ASSIGN art_space "FIG.2_HERE"
\LOOP 12
\(art_space\)
\ENDLOOP
The ASSIGN command tells TFORM to store the string “FIG.2_HERE” in
the variable art_space. TFORM prints the term 12 times in a vertical
column, creating a labeled space for the piece of art.
3–94
11387 Tandem Computers Incorporated
Introduction to TFORM
You can also use a LOOP construct to create several boxes side by side on
the text page. The tops and bottoms of the boxes are simply text lines, but
the sides (you define the depth of the boxes) are in a short LOOP construct
===========
====================
\assign box_depth 5
1
\loop \(box_depth\)
2
=
\endloop
=
=
=
===========
=
=
2
===========
====================
===========
1
ASSIGN command stores value of 5 in variable box-depth.
2
TFORM prints = 5 times to make the box's sides.
The boxes print like this
===========
=
=
=
=
=
=
=
=
=
=
===========
11387 Tandem Computers Incorporated
====================
=
=
=
=
=
=
=
=
=
=
====================
===========
=
=
=
=
=
=
=
=
=
=
===========
3–95
Introduction to TFORM
How to Use the LOOP Construct
The different commands of the LOOP construct are described in the
following paragraphs.
LOOP exp
LOOP exp specifies that TFORM is to format all the text and/or
execute all the commands that appear between the LOOP command
and the following ENDLOOP command, int times. You must provide
TFORM with an expression that evaluates to int ; it can be of any
numeric type, but TFORM truncates any fraction to produce an integer.
NEXTLOOP
If you include a NEXTLOOP command within a loop (which is the only
place it can appear), TFORM immediately jumps back to the preceding
LOOP command and starts the next iteration of the loop.
EXITLOOP
If you include an EXITLOOP command within a loop (which is the only
place it can appear), TFORM immediately terminates the loop and
proceeds to the command or line of text that follows the next
ENDLOOP command.
ENDLOOP
The ENDLOOP command terminates the LOOP construct. A loop must
always end with this command.
3–96
11387 Tandem Computers Incorporated
Introduction to TFORM
Tips
You can’t abbreviate LOOP, NEXTLOOP, EXITLOOP, or ENDLOOP
commands or combine them with other commands; each must be on a
line by itself.
If you omit exp, TFORM goes into an infinite loop, which you must
explicitly terminate with an EXITLOOP command.
All the commands that make up a LOOP construct must be in a single
input file. You should, therefore, check that any LOOP construct
contained in a sourced-in file is both begun and ended in that file.
You may find the LOOP construct quite useful in performing repetitive
processing for numbers of iterations that vary with individual
circumstances. Two such circumstances are the following
1.
Repeated printing of form letters (no expression in the LOOP
command, but a test after each iteration for end-of-file in the nameand-address file followed by an EXITLOOP if that condition is true)
2.
Macro processing (macros are described next) with a varying
number of arguments. For example, a macro could be designed
that clears all previously set tab stops and then sets a number of tab
stops defined by the arguments supplied, which vary with each
invocation of the macro. Within such a macro, the function ARG(0)
could supply the number of arguments present each time the macro
is called. The LOOP construct would then perform one iteration for
each argument.
You can nest loops within other loops. When you do this, the
innermost loop runs from start to finish before the next iteration of the
outer loop can begin. That loop, in turn, runs to completion during a
single iteration of the next outer loop (if any), and so on.
11387 Tandem Computers Incorporated
3–97
Introduction to TFORM
MACRO A macro is a group of commands and text that you define as a unit. You
can refer to it repeatedly within the main body of your document, and you
can pass arguments to it so that its action can be dynamically altered. A
macro resembles a subroutine.
What to Enter
\MACRO macro-name



BEGIN [ LOCAL var [‚ var] ... ]
APPEND
DELETE



. . .
commands and/or text
. . .
[ \EXITMACRO | \RETURN ]
. . .
commands and/or text
. . .
\ENDMACRO [ macro-name ]
macro-name
is a name that represents a MACRO construct. A macro-name can be
no longer than 32 characters; it must begin with a letter; and the
remaining characters may be letters, numbers, and/or underscore (_)
characters. The name must be unique from all other macro and
command names.
3–98
11387 Tandem Computers Incorporated
Introduction to TFORM
How to Use the MACRO Construct
You call a macro by using the name in a macro invocation command
(described elsewhere in this section).
You can also change the structure of a macro within your document by
appending lines to it, and you can delete the macro (usually to make way
for another macro with the same name) during document processing.
The different commands of the MACRO construct are described in the
following paragraphs.
MACRO macro-name BEGIN
This command defines a macro with that given name. The text and
commands that follow, up to and including the associated
ENDMACRO command, constitute the body of the macro. You must
enter the MACRO BEGIN command by itself on an input line.
The macro-name must be different from other names of TFORMsupplied macros, macros you define, and all command names. You can
abbreviate a macro-name , but this name must remain unique within
its first three characters. If the macro-name is not unique, TFORM
issues an error message and ignores the macro.
MACRO macro-name BEGIN LOCAL
The keyword LOCAL in a MACRO BEGIN command specifies that all
of the variable names following it on a command line represent entities
that are local to the scope of the macro. The scope of a macro begins
with the MACRO BEGIN command and ends with the ENDMACRO
command, and it includes the scopes of any other macros that the
current macro might invoke. In other words, the macro (and any macro
it invokes) has access to local copies of the specified variables, and it
can alter their values without affecting any variables that might have
the same names elsewhere in the document. Variables not modified
with the keyword LOCAL have a global scope, and if the macro
changes them, they are changed wherever they appear.
11387 Tandem Computers Incorporated
3–99
Introduction to TFORM
MACRO macro-name APPEND
This command defines the beginning of a group of lines, up to the
corresponding ENDMACRO command, that you want to add to an
existing macro with the specified name. If no such macro exists,
APPEND has the same effect as BEGIN.
ENDMACRO macro-name
This command defines the end of the macro named in the MACRO
BEGIN command. You must enter this command on its own line.
EXITMACRO or RETURN
Within the body of a macro, the EXITMACRO or RETURN command
immediately terminates macro execution. These two command names
are synonymous and function in the same way. The command you use
must be on a line of its own.
MACRO macro-name DELETE
This command deletes the macro-name. If no such macro exists, the
command has no effect. You must enter this command on its own line.
It requires no corresponding ENDMACRO command.
Tips
You can’t abbreviate MACRO, EXITMACRO, RETURN, or
ENDMACRO commands, or combine them with other commands; each
must be on a line of its own.
The EXITMACRO and RETURN commands serve the same purpose
within the MACRO construct. The RETURN command, with no
expression, is allowed within a MACRO construct for the sake of
consistency with the FUNCTION construct. In that construct, RETURN
is also used to terminate execution of a function. If you are using
RETURN to tell TFORM to terminate execution of a function, you can
also use it to signal termination of a macro.
3–100
11387 Tandem Computers Incorporated
Introduction to TFORM
You can put macro definitions anywhere you want in your document,
but it’s a good idea to group them together in one place. If you put
them in a separate file and read them in, several different documents
can share them.
You can abbreviate macro-names, just as you can TFORM-supplied
macro and command names. For this reason, any name you use must
be unique within its first three characters. You can use 1- and 2-letter
names if you wish, but they can’t be abbreviated.
All the commands that make up a MACRO construct must be in a
single input file. You should therefore check that any MACRO
construct contained in a sourced-in file is both begun and ended in that
file.
You must type a corresponding ENDMACRO command for every
MACRO BEGIN or MACRO APPEND command. If you put a
macro-name in an ENDMACRO command, it must agree with the
name in the most recent MACRO BEGIN or MACRO APPEND
command.
As a general rule, it’s a good idea to declare as LOCAL all variables that
are relevant only within the macro.
If you include a DEFINE command in a macro, any character you
redefine, except the trigger character, retains its new definition when
you return from the macro. However, if you change the trigger
character, it reverts to its original definition when the macro ends.
See Appendix G for examples of MACRO constructs and a macro
invocation command.
11387 Tandem Computers Incorporated
3–101
Introduction to TFORM
Macro Invocation You use a macro invocation command to start execution of a macro and to
Command pass arguments to it.
What to Enter
\macro-name [ exp1 [ [ exp2 ] ... [ [ exp(n) ] ] ] ]
How to Use the Macro Invocation Command
Within the body of the macro, you can use the ARG(exp) function
(described in Section 5) to access the value, or the text, of each argument
you pass to it. ARG(0) gives the number of arguments passed in the current
invocation. (Trying to access an argument beyond the last one causes a
“VALUE OUT OF RANGE” error.) The number of arguments you can pass
is limited only by the length of an edit line (255 characters). Refer to
Appendix G for an example of a macro and its invocation command.
Whenever TFORM encounters a trigger character followed by a name, it
searches for a command, a user macro, or a system macro with that name.
If it finds none, it looks in the subvolume in use at the time you started
TFORM for a file called TFORMLIB. If that file doesn’t exist, it accesses
$SYSTEM.SYSTEM.TFORMLIB. If TFORM can’t find the macro at all, it
issues a “command error” message.
$SYSTEM.SYSTEM.TFORMLIB contains the TFORM-supplied system
macros (such as LEVEL, LIST, and TODAY). If you want, you can build
your own macro library file named TFORMLIB in the subvolume you work
in when creating document files that use the system macros. If you want to
use the system macros, you must either include a copy of
$SYSTEM.SYSTEM.TFORMLIB in your own TFORMLIB, or your
TFORMLIB must source in the system TFORMLIB.
If you copy $SYSTEM.SYSTEM.TFORMLIB to your filed named
TFORMLIB, you can customize the system macros in any way you wish.
However, if you change the macros in your TFORMLIB, you should not
also source in $SYSTEM.SYSTEM.TFORMLIB. TFORM will give an error if
it tries to define the second occurrence of the macro.
3–102
11387 Tandem Computers Incorporated
Introduction to TFORM
NEW
The NEW command creates a page break and causes printing to begin on a
new page.
What to Enter
\NEW [ ODD | EVEN ]
Examples:
\NEW
\NEW ODD
\NEW EVEN
How to Use NEW
The different options of the NEW command are described in the following
paragraphs.
NEW
NEW tells TFORM to start a new page. If the formatted output is
already at the top of a new page, the NEW command has no effect.
NEW ODD
NEW ODD tells TFORM to start a page with the next odd number
higher than that of the current page, incrementing the page counter
accordingly. If the current page has an odd number, or if the formatted
output is already at the top of a new even-numbered page, TFORM
issues an even-numbered page with the proper headers and footers, but
with a blank text area. TFORM then continues the text on the next odd
page. If the formatted output is already at the top of a new oddnumbered page, the NEW ODD command has no effect.
11387 Tandem Computers Incorporated
3–103
Introduction to TFORM
NEW EVEN
NEW EVEN starts a page with the next even number following that of
the current page, incrementing the page counter accordingly. If the
current page has an even number, or if the formatted output is already
at the top of a new odd-numbered page, TFORM issues a blank oddnumbered page before continuing the text on the next even page. If the
formatted output is already at the top of an even-numbered page, the
NEW EVEN command has no effect.
Tips
Do not include any form of the NEW command within the scope of a
KEEP command; if you do, TFORM issues an error message and
ignores the NEW command.
Be careful where you place NEW commands. If you intend to insert a
page break at a certain point, you should put the NEW command
immediately following the last line of text before the desired break. If
you leave any blank lines between that text and the NEW command,
and a natural page break occurs right after the text, TFORM starts a
new page. When it finds the NEW command, TFORM causes another
page break, even though it has placed just the blank lines on the page
before. Your NEW command thus mistakenly produces an extraneous
blank page.
The NEW command also causes a line break, and signals the beginning
of a new paragraph as well.
3–104
11387 Tandem Computers Incorporated
Introduction to TFORM
PAGE
You use the PAGE command to turn page numbering on and off, set the
page counter to begin at a certain integer, and determine the increment
TFORM uses to increase or decrease the page numbering. (See also the
HEADER and FOOTER commands).
What to Enter



\PAGE
ON
OFF
[ + | - ] int [ .int ]



Examples:
\PAGE ON
\PAGE -53
\PAGE 14.1
\PAGE OFF
How to Use PAGE
The different options of the PAGE command are described in the following
paragraphs.
PAGE ON
PAGE ON turns on page numbering, which takes effect on the current
or next page (see “Tips”). TFORM uses the system variable
SYS_PAGENUMBER) as a page counter, incrementing it by 1 with each
subsequent page.
11387 Tandem Computers Incorporated
3–105
Introduction to TFORM
PAGE OFF
PAGE OFF turns off page numbering. TFORM continues to increment
the page counter, however, so that if you issue a later PAGE ON
command, the next page will have the correct sequential number.
PAGE int [ .int ]
PAGE int [ .int ] sets the page counter to int or int.int. TFORM
then continues to increment the page counter from that value. If you
choose the option of “point” page numbering with int.int, TFORM
increments by .01 to number subsequent pages up to int .99 or until
finding another PAGE command.
Since TFORM increments by .01, the second integer following the
decimal is taken as a stand-alone integer, that is, 2.9 is equal to 2.09
when adding or substracting from pages.
When you first start TFORM, the default condition is PAGE 1.
PAGE +int [ .int ]
PAGE +int [ .int ] adds int [ .int ] to the current value of the
page counter.
PAGE -int [ .int ]
PAGE -int [ .int ] subtracts int [ .int ] from the current value of
the page counter. If the page count becomes less than zero, TFORM
stops incrementing it and stops printing it.
3–106
11387 Tandem Computers Incorporated
Introduction to TFORM
Tips
The PAGE command is effective only if you have made provision for
printing page numbers by putting the page-number character, #, in a
title. Refer to the HEADER or FOOTER command for a description of
title and how to use the # character in the title.
If you enter a PAGE command at the beginning of a page, it takes effect
with that page; if any text has already appeared on that page, however,
the PAGE command has no effect until the next page. Note that certain
commands, such as SPACE and TITLE, create text.
If you enter a PAGE OFF command and do not want to resume with the
correct sequential numbers when you turn page numbering back on,
use the PAGE int[.int] command. This command overrides the
sequential numbering feature and resets the page counter with the
number you want TFORM to use when resuming page numbering.
Up to 99 “point” pages can be inserted after a given page without
disturbing the original page numbering. The presumed PAGE
command that would turn off the “point” page numbering is the next
whole-integer page number; for example, when a \PAGE 14.1
command and the intervening text is followed by a \PAGE 15
command, TFORM resumes incrementing page numbers by 1 at
page 15.
Since the default page number is 1, you can use at least PAGE –2 if you
want to stop page numbering by making the page count less than zero.
11387 Tandem Computers Incorporated
3–107
Introduction to TFORM
PRINT
The PRINT command controls a number of options available to you in
producing your document. These options include printing from selected
bins of a cut-sheet feeder, printing selected pages by number, and defining
an offset for each page to allow for binding or hole punching.
What to Enter
FIRST
[ALL] ODD
EVEN
BIN
[ int ]
DRAFT [ON | OFF]
ERRORS [ON | OFF]
MANUALLY [ON | OFF]
\PRINT
OFFSET
FIRST
[ALL] ODD
EVEN
PAGES
int
int | int
CHANGES
WARNINGS [ON | OFF]
3–108
11387 Tandem Computers Incorporated
[[+|—] num [units]]
, ...
Introduction to TFORM
Examples:
\PRINT BIN ALL ODD
\PRINT ERRORS OFF
\PRINT OFFSET FIRST 5 CHARS
\PRI PAG 25/75, 80, 100
How to Use PRINT
The options you define with the PRINT command normally remain in effect
for the entire document, so you will usually put this command at the
beginning of the input file. You can alter a previous command or add a
new option by inserting PRINT commands later in the file. However, any
PRINT command following text on a page (unless the text is a NEW
command) takes effect on the page after the command appears.
PRINT with no options resets all the PRINT command options to their
defaults.
The different options of the PRINT command are described in the following
paragraphs.
11387 Tandem Computers Incorporated
3–109
Introduction to TFORM
PRINT BIN Options
The BIN options control the feeding of paper from either of the two bins
of the cut-sheet feeder available with the Tandem 5530 letter-quality
printer. If the printer you’re using isn’t a 5530 or doesn’t have a cutsheet feeder attached, TFORM issues a warning message and ignores a
PRINT BIN command.
If you enter simply PRINT BIN without specifying any options, the BIN
option applies to all pages following the command (rather than, for
example, the first page, odd pages, or even pages).
PRINT BIN with no options at all resets everything to the default.
PRINT BIN FIRST
This command tells TFORM to print only page 1 of the document
from the specified bin.
PRINT BIN ODD
This command tells TFORM to print the ODD pages from the
specified bin 3, 5, 7, and so on. If you want ODD to include page
1, use the keyword ALL PRINT BIN ALL ODD.
PRINT BIN EVEN
This command refers to pages 2, 4, and so on, and tells TFORM to
print all EVEN pages from the specified bin.
3–110
11387 Tandem Computers Incorporated
Introduction to TFORM
PRINT BIN int
The int option allows you to define the bin, 1 or 2, from which
paper is to be fed. If you omit it, TFORM resets the bin number for
the specified or implied range of pages to the default, bin number 1.
For example, if you have letterhead paper in bin 2 and blank paper
in bin 1, you could type
\PRINT BIN FIRST 2
to print the first page on letterhead paper and all others on plain
paper.
The default is PRINT BIN 1 and applies to all pages.
PRINT DRAFT Option
The DRAFT option lets you print draft versions of documents, for
proofreading and verification, on a high-speed printer in nearly the
same form as that produced by the Tandem 5530, but much faster.
Because the 5530 letter-quality printer can expand and compress lines
of text for better fit between margins and because it supports true
proportional spacing (which affects where line breaks occur), TFORM
uses a different line-break algorithm when formatting for the 5530
printer than it does for other printers.
PRINT DRAFT ON
PRINT DRAFT and PRINT DRAFT ON mean the same thing. They
tell TFORM to use the line-break algorithm for the device type
opposite to the one actually in use. That is, if you send output to a
line printer, TFORM treats it as a letter-quality printer; if the actual
device is a 5530 printer, TFORM treats it as a line printer.
PRINT DRAFT OFF
PRINT DRAFT OFF tells TFORM to perform in the normal way,
using the algorithm for the actual device.
The default is PRINT DRAFT OFF.
11387 Tandem Computers Incorporated
3–111
Introduction to TFORM
PRINT ERRORS Option
The PRINT ERRORS option allows you to control the printing of error
pages.
PRINT ERRORS ON
PRINT ERRORS ON (or just PRINT ERRORS) causes TFORM to
print error messages when it sends output to an actual device (if
any errors exist). For each page of text containing errors, TFORM
prints the error messages for that page on another page, separate
from the text output. The error pages are numbered to correspond
with the respective text pages.
PRINT ERRORS OFF
PRINT ERRORS OFF suspends printing of error pages. If errors
exist, you might be able to see their effect, but TFORM gives no
indication that any errors occurred.
The default condition is PRINT ERRORS ON.
3–112
11387 Tandem Computers Incorporated
Introduction to TFORM
PRINT MANUALLY Option
The MANUALLY option, which works only with the 5530 letter-quality
printer, lets you feed the first page by hand. Alternately, if you direct
your document to your terminal first instead of to an output device, this
option allows you to tell TFORM to process your document page by
page so you can check it at your own speed.
PRINT MANUALLY ON
PRINT MANUALLY ON (or just PRINT MANUALLY) causes the
printer not to eject a page before starting printing. You load a sheet
of paper, align it to the top-of-form position, then tell TFORM to
start sending output to the printer.
If you display TFORM output at your terminal screen, you can use
this option to tell TFORM to display your document one page at a
time. Omit the OUT statement from the RUN command to direct
your document to your terminal screen, then add the PRINT
MANUALLY ON command. For example
TFORM / IN filename /\PRINT MANUALLY ON
When TFORM finishes displaying a page at your terminal, it sends
this message to the terminal
Press RETURN to resume processing
PRINT MANUALLY OFF
PRINT MANUALLY OFF causes the cut-sheet feeder to feed paper
automatically. Alternately, if you are directing your document to
your terminal rather than to an output device, this command tells
TFORM to display the document in its usual way.
The default condition is PRINT MANUALLY OFF.
11387 Tandem Computers Incorporated
3–113
Introduction to TFORM
PRINT OFFSET Options
The OFFSET options let you shift the entire printed portion of a page to
the right on odd-numbered pages and to the left on even-numbered
pages, thus allowing space for binding or hole-punching.
You can create this type of space for an odd-numbered page, for
example, by defining a narrow left margin and a wide right margin,
then by using PRINT OFFSET commands, which TFORM applies to a
page after all other formatting has been done. TFORM uses PRINT
OFFSET commands to shift the entire printed portion to the left or
right; this shift creates, in effect, a movable “logical left edge.” TFORM
then uses this adjusted left edge as the left margin rather than the
original left margin of the page. (Horizontal tab stops, described under
“SET,” are also based on this adjustable left edge).
PRINT OFFSET with no options at all resets everything to the default,
PRINT OFFSET 0 (print all pages with no offset).
PRINT OFFSET FIRST
This command tells TFORM to offset only page 1 of the document.
PRINT OFFSET ODD
This command tells TFORM to offset the ODD pages 3, 5, 7, and so
on. If you want ODD to include page 1, use the keyword ALL
PRINT OFFSET ALL ODD.
PRINT OFFSET EVEN
This command refers to pages 2, 4, and so on, and tells TFORM to
offset all EVEN pages.
PRINT OFFSET num
This command sets the print offset for the specified or implied
scope of pages to num units. If you don’t specify a num , TFORM
uses zero (the default offset), which resets any previously specified
offset.
You can specify any units that TFORM recognizes; if you don’t
specify units , TFORM uses INCHES.
3–114
11387 Tandem Computers Incorporated
Introduction to TFORM
PRINT OFFSET +num
This command adds num to the current offset for the specified or
implied scope of lines.
PRINT OFFSET -num
This command subtracts num from the current offset for the
specified or implied scope of lines.
PRINT PAGES Options.
The PRINT PAGES options allow you to specify which pages you want
printed.
The default condition is PRINT PAGES (print all pages automatically).
See the EXIT command to see how you can use the EXIT command to
shorten the time for TFORM to print pages.
PRINT PAGES int
This command tells TFORM to print only the page(s) numbered
int. (Depending on your numbering scheme,there might be more
than one page with that number.)
PRINT PAGES int/int
This command tells TFORM to print all pages from int1 through
int2; int1 must be less than or equal to int2.
You can specify a series of pages and page ranges in one command,
separating them with commas (page numbers don’t have to be in
ascending sequence). For example
\PRINT PAGES 3, 7, 10/12, 45, 22
Multiple PRINT commands, however, can affect each other. A
subsequent PRINT command supersedes an earlier one, so if a
PRINT PAGES 8 command follows a PRINT PAGES 9 command,
TFORM prints only page 8.
11387 Tandem Computers Incorporated
3–115
Introduction to TFORM
PRINT PAGES CHANGES
This command tells TFORM to print only those pages that contain
one or more lines marked with the change character (see also the
CHANGES command).
PRINT WARNINGS Option
The PRINT WARNINGS option enables or disables the printing of
warning messages.
TFORM classifies certain error conditions as warnings, most of which
are the result of the printer (other than a 5530 printer) being unable to
do a requested action. TFORM doesn’t usually print notification of
these conditions unless you request them.
PRINT WARNINGS ON
PRINT WARNINGS ON (or just PRINT WARNINGS) causes
TFORM to include warning messages on error pages (if any) when
it sends output to an actual device. TFORM numbers the error
pages to correspond with the page on which it found the error
condition.
PRINT WARNINGS OFF
This command suppresses warning messages. The effect of such
conditions might be evident, but TFORM gives no notification of
errors.
The default is PRINT WARNINGS OFF.
3–116
11387 Tandem Computers Incorporated
Introduction to TFORM
Tips
TFORM processes PRINT commands in the order in which it
encounters them; a later command supersedes any previous command
of the same type that refers to the same scope of pages.
The minimum page offset is 0 minus the width of the left margin. The
sum of the page offset and the line length must be less than or equal to
the current width of the page.
If you use flexible units such as CHARS in a PRINT OFFSET command,
the actual measurement depends on the pitch setting in effect at the
time you issue the command. TFORM converts the offset to decipoints
when it encounters the command; that page offset then remains
constant throughout the remainder of the document (unless you issue
another PRINT OFFSET command), regardless of any subsequent
changes in pitch.
You’ll probably use the PRINT PAGES command less often in the input
file than in the RUN command that invokes TFORM. If you do insert it
in a file, you should put it either at the beginning of the file or after a
NEW command, with no intervening text. If it’s not at the beginning of
a page, it won’t take effect until the following page (which may be
too late).
A PRINT PAGES command can print only those text pages that
TFORM hasn’t already processed before encountering the command.
TFORM does, however, print error pages that refer to preceding text
pages. PRINT PAGES 32500 (assuming your document has no page
number that high) is an effective way to print only the error pages for a
document.
11387 Tandem Computers Incorporated
3–117
Introduction to TFORM
SET The SET command controls environment parameters that govern the way in
which TFORM formats lines.
What to Enter
BOX
ON [ ARROW ]
OFF
CHANGES { ON | OFF }
DOWNSHIFT { ON | OFF }
ERRORS { ON | OFF }
HYPHENS
ON
int
ENGLISH
ANYWHERE
OFF
JOIN { ON | OFF }
\SET
JUSTIFY { ON | OFF }
PITCH
HORIZONTAL
int
PROPORTIONAL
VERTICAL int
SEQUENCING { ON | OFF }
SPACING [ num ] [ FIXED ]
TABS { ON | OFF } [ int [ , int ] ...]
UPSHIFT { ON | OFF }
WARNINGS { ON | OFF }
3–118
11387 Tandem Computers Incorporated
Introduction to TFORM
Examples:
\SET BOX ON ARROW
\SET JOIN OFF
\SET PITCH HORIZONTAL 12
\SET TABS ON 5, 25, 45
How to Use SET
The different options of the SET command are described separately on the
following pages.
SET BOX Option
The SET BOX command allows you to create a box in your document.
The box can contain as little as two lines or the entire page, and you can
put whatever you choose inside it.
SET BOX ON
SET BOX ON causes TFORM to issue a line break, then print a line
of “box-top” characters (a hyphen, or whatever character you
define—see the DEFINE command). The width of the line is the
width of the text region for the page. On all subsequent lines,
TFORM prints a “left-side” character, a line of text, and a “rightside” character (both side characters are vertical lines by default).
TFORM inserts a blank line between the top of the box and the first
text line. While the SET BOX command is in operation, TFORM
issues an implicit INDENT ON BOTH +2 command to provide
margins between the sides of the box and the text. Joining and
justification, if they were in effect at the time you created the box,
remain in effect inside the box.
11387 Tandem Computers Incorporated
3–119
Introduction to TFORM
SET BOX ON ARROW
If you include the keyword ARROW and the box extends over a
page boundary, TFORM inserts an extra line with a right-pointing
arrow at the right side to indicate that the box continues on the next
page. TFORM then closes the box with a line of “box-bottom”
characters (hyphens, by default), ends the page, and starts a new
box at the top of the next page, continuing to print the text where it
left off. If you include ARROW, one less line will fit on the page.
SET BOX OFF
SET BOX OFF causes TFORM to turn off the implicit indentation,
issue a blank line at the bottom of the box, and close the box.
SET CHANGES Option
The SET CHANGES command allows you to control the printing of
change marks in your document.
SET CHANGES ON
SET CHANGES ON causes TFORM to print change marks in the
right margin for all subsequent lines up to the corresponding SET
CHANGES OFF command.
SET CHANGES OFF
Once you activate SET CHANGES ON, TFORM continues to print
change marks in the margin until it locates this command. SET
CHANGES OFF turns off the change marks.
TFORM retains the SET CHANGES commands for compatibility
with T-TEXT. However, the CHANGES command is a better
device for marking changed text lines, since it doesn’t cause a line
break as the SET CHANGES command does. You can use the
CHANGES command to mark individual words or phrases when
joining is in effect, but the SET CHANGES commands work well
only with whole paragraphs.
Location and space requirements for change marks produced by
SET CHANGES commands are the same as for the CHANGES
command.
3–120
11387 Tandem Computers Incorporated
Introduction to TFORM
SET DOWNSHIFT Option
The SET DOWNSHIFT command allows you to convert all uppercase
letters in the number of lines you define to lowercase.
SET DOWNSHIFT ON
SET DOWNSHIFT ON causes TFORM to convert all uppercase
letters to lowercase between this command and the corresponding
SET DOWNSHIFT OFF command.
SET DOWNSHIFT OFF
TFORM continues to execute a SET DOWNSHIFT ON command
until it locates this command, which turns off the SET
DOWNSHIFT.
SET ERRORS Option
The SET ERRORS command specifies whether or not you want TFORM
to report errors it locates as it processes your input.
SET ERRORS ON
SET ERRORS ON turns on the error-reporting mechanism, which
remains on until TFORM encounters a SET ERRORS OFF
command.
SET ERRORS OFF
SET ERRORS OFF is the default condition for this command and
turns off a SET ERRORS ON command.
11387 Tandem Computers Incorporated
3–121
Introduction to TFORM
SET HYPHENS Option
You use the SET HYPHENS command to control hyphenation in your
output.
SET HYPHENS ON
SET HYPHENS ON turns on automatic hyphenation, which
remains in effect until TFORM encounters a SET HYPHENS OFF
command. The different features that you can choose to customize
SET HYPHENS ON are the following
SET HYPHENS ON int specifies that int is the smallest
number of characters that can be broken off from the rest of the
word. The default is 3.
SET HYPHENS ON ENGLISH int states that the hyphenation
algorithm is to take into account the rules governing syllabication
of English words.
SET HYPHENS ON ANYWHERE int states that hyphenation is
to be based strictly on character count, with no attempt to
identify syllables.
If you omit both ENGLISH and ANYWHERE, TFORM uses
ENGLISH rules.
SET HYPHENS OFF
SET HYPHENS OFF turns off automatic hyphenation. This command is
also the default condition.
Occasionally you might find a word hyphenated incorrectly due to
either of two reasons (1) hyphenation is done by an algorithm and so
can’t be 100 percent correct at all times (given the many spelling
exceptions in the English language), or (2) TFORM doesn’t attempt
hyphenation on words that contain capital letters or nonalphabetic
characters. You can remedy these conditions, or establish your own
hyphenation rules for non-English words, by using the “discretionary
hyphen” metacharacter. This feature is described in Section 4 of this
manual.
3–122
11387 Tandem Computers Incorporated
Introduction to TFORM
SET JOIN Option
You can control the joining of lines with the SET JOIN command.
Joining is a feature of TFORM that involves lengthening or shortening
lines of text to fit within a certain text width.
SET JOIN ON
SET JOIN ON turns on line joining, which remains in effect until
TFORM encounters a SET JOIN OFF command. When joining is
ON, TFORM examines each input line in a paragraph. If a line is
too short, TFORM adds one or more words from the next line to
your current line. TFORM breaks lines that are too long and adds
the word or words that didn’t fit to the next line.
In addition, when joining is ON, TFORM treats text as being
grouped into words, sentences, and paragraphs. It adjusts all
horizontal white space (for example, spaces between words) and
vertical white space (blank lines) according to the rules you specify
with the STYLE SENTENCE and STYLE PARAGRAPH commands,
which are normally added at the start of your document.
A blank input line or any of the commands that signal the start of a
new paragraph (BREAK PARAGRAPHS, FOOTER, HEADER,
NEW, STYLE, and TITLE) stops joining. An input line that contains
nothing but a command trigger, and any of the commands that
cause a mandatory line break (BREAK, CENTER, DEFINE, KEEP,
SET, SPACE, and VERBATIM), also stops joining. TFORM resumes
line joining at the start of the next text line.
SET JOIN OFF
SET JOIN OFF turns off line joining. It also effectively turns off line
justification (see below) if it is on, since joining is essential to the
operation of the right-justification feature. If you turn joining on
again, justification resumes (if justification was on before, and if
you didn’t explicitly turn it off in the meantime).
The default condition is SET JOIN OFF, when TFORM operates in
the stand-alone mode, and SET JOIN ON, when running with
T-TEXT.
11387 Tandem Computers Incorporated
3–123
Introduction to TFORM
SET JUSTIFY Option
You can control the justification of text lines (vertical alignment of text
at the left and right margins) with the SET JUSTIFY command.
SET JUSTIFY ON
SET JUSTIFY ON causes TFORM to insert extra horizontal space, as
needed, in output lines to align the first and last characters of each
line with the left and right margins, respectively.
TFORM justifies lines differently for different printers. For most
printers, TFORM inserts extra space characters between words,
distributing them as evenly as possible. For the 5530 printer,
TFORM performs “microjustification,” inserting tiny amounts of
space between letters in equal amounts, starting alternately from
the left and right margins of the line. It is usually impossible to tell
where the extra space has been inserted.
SET JUSTIFY OFF
SET JUSTIFY OFF turns off right-justification. If joining is ON and
you turn it off, you automatically turn off justification. If you want
to justify without joining (which is possible, although it can cause
excessive space to be added between words in short lines, which is
why joining and justification usually go together), you must
explicitly turn justification back on after turning joining off. SET
JUSTIFY OFF is the default condition.
A blank line, or any command that causes a mandatory line break,
temporarily halts justification. TFORM resumes right-justification
at the start of the next text line.
3–124
11387 Tandem Computers Incorporated
Introduction to TFORM
SET PITCH Option
SET PITCH commands control horizontal and vertical spacing of the
output text (the number of characters per inch horizontally or the
number of lines per inch vertically). The different features you can
specify to customize the SET PITCH option are the following
SET PITCH HORIZONTAL int sets the horizontal spacing to int
characters per inch. The choices available are 10, 12, 15, and
PROPORTIONAL; the latter is very close to 12 characters per inch,
but TFORM adjusts the output to allow for the actual width of each
character (“m” is much wider than “i,” for example, so TFORM
adjusts the spacing accordingly). You can omit the keyword
HORIZONTAL if you prefer; TFORM assumes you mean horizontal
pitch if you don’t specify otherwise.
SET PITCH VERTICAL int sets the vertical spacing to int lines per
inch. The minimum acceptable value is 1 and the maximum is 48.
The 5530 printer is capable of vertical spacing in 1/48-inch
increments; the usable values for vertical pitch are 1, 2, 3, 4, 6, 8, 12,
16, 24, and 48. If you specify a different value, TFORM adjusts the
pitch to the nearest one of those listed.
SET PITCH with no options sets both pitches to their defaults, SET
PITCH HORIZONTAL 10 and SET PITCH VERTICAL 6.
11387 Tandem Computers Incorporated
3–125
Introduction to TFORM
SET SEQUENCING Option
The SET SEQUENCING command allows you to number one or more
lines of your printed output.
SET SEQUENCING ON
This command causes TFORM to print a sequence number to the
right of each text line, starting with 1 at the point where the
command occurs, then starting over with 1 at the top of each page.
These are the sequence numbers of the lines on a given page, not
the original edit line numbers in the input file.
At least 5 (6, if there are more than 99 lines on a page) character
positions must be available in the right margin for sequence
numbering to function.
SET SEQUENCING OFF
This command turns off the sequence numbering. It is also the
default condition, resetting the numbering to 1.
If you start sequencing lines on one page, stop, then resume
sequencing on the same page, the sequence numbers for both sets
of lines will begin at 1.
3–126
11387 Tandem Computers Incorporated
Introduction to TFORM
Spacing Option
You can use the SET SPACING command to control how many lines
TFORM places between text lines.
SET SPACING num
This command tells TFORM to output (num-1) blank lines after each
line of text. So SET SPACING 1 produces 0 blank lines between
text lines (single spacing), SET SPACING 2 gives one blank line
(double spacing), and so on. Spacing can be done in half-line
increments, too SET SPACING 1.5 yields “line-and-a-half”
spacing, and so on. The physical interline space depends on the
current vertical pitch.
The minimum usable value is 1 (TFORM treats any value less than
1 as if it were 1); the maximum is 32. The value must be unsigned
and must be in whole- or half-line increments. The default is 1.
SET SPACING FIXED
When you specify SET SPACING with the keyword FIXED (with or
without a spacing value), you tell TFORM to maintain the specified
spacing at all times. Normally, TFORM adds an extra half line of
space before or after the current line for each level of superscript or
subscript (they can be nested) that the line contains. TFORM has no
way of knowing—especially if you are using proportional
spacing—if the superscript or subscript will overlap any characters
on the adjacent line. If you tell TFORM not to do that with the
FIXED parameter, preventing overlap of superscripts and
subscripts is your responsibility.
SET SPACING
SET SPACING with no value (with or without the keyword FIXED)
resets the interline spacing to its default. The default is SET
SPACING 1.
11387 Tandem Computers Incorporated
3–127
Introduction to TFORM
SET TABS Options
The SET TABS command lets you set, remove, and change tab stops.
When TFORM sees a symbolic tab escape sequence (\>) in the text (see
the explanation of the escape sequences in Section 4), it adjusts the
output to begin at the next tab stop to the right of the current print
position, or, if no such tab stop exists, at the beginning of the next line
(the left margin is always an implicit tab stop).
You set tab stops in increments of character positions. That is, if the
current horizontal pitch is 10 characters per inch, there are 10 potential
tab stops per inch. If you are using proportional pitch, TFORM uses 12
positions per inch, which is close enough to the actual spacing to be
workable.
SET TABS ON
This command, without one or more int values, clears any
currently set tab stops and sets new tab stops at every eighth
character position.
SET TABS ON, with one or more int values, sets tab stops at the
specified character columns. This form of the SET TABS command
is cumulative; that is, it does not clear any existing tab stops, but
adds new ones to those already set.
SET TABS OFF
This command, without one or more int values, clears all tab
settings (except for the implicit tab at the left margin). The default
condition is SET TABS OFF.
SET TABS OFF, with one or more int values, clears the tab stops in
the specified columns. If no tab stop was set at a specified character
position, the operation is meaningless. TFORM, however, does not
consider it as an error.
3–128
11387 Tandem Computers Incorporated
Introduction to TFORM
SET UPSHIFT Option
The SET UPSHIFT command allows you to convert all lowercase letters
in the number of lines you define to uppercase.
SET UPSHIFT ON
SET UPSHIFT ON causes TFORM to convert all lowercase letters to
uppercase between it and the corresponding SET UPSHIFT OFF.
SET UPSHIFT OFF
TFORM continues to execute a SET UPSHIFT ON command until it
locates this command, which turns off SET UPSHIFT. The default
condition is SET UPSHIFT OFF.
SET WARNINGS Option
The SET WARNINGS command specifies whether or not you want
TFORM to report warnings it locates as it processes your input.
SET WARNINGS ON
SET WARNINGS ON causes TFORM to report any error conditions
it classifies as warnings. This remains in effect until you issue a
SET WARNINGS OFF command.
SET WARNINGS OFF
SET WARNINGS OFF turns off the warning reporting you have
previously requested. The default condition is SET WARNINGS
OFF.
11387 Tandem Computers Incorporated
3–129
Introduction to TFORM
Tips
If you issue a NEW command while a SET BOX command is in effect,
TFORM carries the box to the bottom of the page and closes it (printing
an arrow if you included the keyword), starts a new page, and reopens
the box. This happens even if the very next command after the NEW
command is a SET BOX OFF command—in that case, the result is a
two-line empty box at the top of the new page. If you mean to finish
the box, then start a new page, you must enter a SET BOX OFF
command before the NEW command.
Only the 5530 letter-quality printer can change pitch. If TFORM finds
the SET PITCH command in a file being sent to another type of printer,
TFORM issues a warning message and ignores the command.
Only the 5530 printer can handle interline spacing in fractions of lines.
If you issue a SET SPACING command with a noninteger value in a file
sent to a printer that can’t deal with it, TFORM issues a warning
message and ignores the command.
The SET ERRORS and SET WARNINGS commands determine whether
those conditions are reported on a line-by-line basis. The PRINT
ERRORS and PRINT WARNINGS commands control the actual
printing of error message pages (which are separate from text pages
you produce from the contents of your file).
Tab stop positions are based on the left edge of the paper (or rather the
“logical left edge” if you use the PRINT OFFSET command), not on the
left margin. Suppose for example that you are using a horizontal pitch
of 10 and a PRINT OFFSET 1 INCH command (which establishes a
1-inch left margin of 10 character positions). The leftmost usable tab
stop is column 11, and this is where TFORM sets its implicit tab stop.
Therefore, you must set your tabs at columns greater than 11 for them
to be functional.
All forms of the SET command also cause a line break.
3–130
11387 Tandem Computers Incorporated
Introduction to TFORM
SOURCE The SOURCE command allows you to include another input file as part of
your current document at any point in the document.
What to Enter
 [ PROFILE ]  RESTORE
 SKIP


 RETAIN 
USE 

\SOURCE filename


VERBATIM



filename
is a valid GUARDIAN 90 file name belonging to a file that is either an
EDIT file (file code 101) or a T-TEXT file (file code 102). It can be from
one to eight alphanumeric characters; the first must be alphabetic.
Examples:
\SOURCE MYINDEX SKIP PROFILE RESTORE
\SOURCE MYDOC1 USE RESTORE
\SOURCE MYDOC2 USE PROFILE RETAIN
\SOURCE CLIENTS VERBATIM
11387 Tandem Computers Incorporated
3–131
Introduction to TFORM
How to Use SOURCE
When TFORM encounters a SOURCE command, it opens the specified file;
reads and formats it; and, when TFORM arrives at the end of that file,
resumes processing the current file. Additional options in the SOURCE
command let you specify whether T-TEXT profile commands in that other
file should be used or ignored. You can also specify whether TFORM
should retain the effects of any commands or if all formatting conditions
should be restored to their original states before the file was sourced in.
SOURCE filename, with no options, uses the default condition (SOURCE
USE PROFILE RETAIN).
SOURCE filename SKIP PROFILE RESTORE
If the file you read in is a T-TEXT file, it has a “profile” at the beginning
that specifies the margins and tab settings—and possibly other
formatter settings such as justification and pitch—for the file. SOURCE
SKIP PROFILE tells TFORM to ignore the profile of the file you are
reading in and to use settings from the current file.
The RESTORE option instructs TFORM that when it resumes
processing the current file, any changes in format settings caused by
commands in the secondary file should be superseded by the settings
defined in the current file.
SOURCE filename SKIP PROFILE RETAIN
This command tells TFORM to ignore any T-TEXT “profile” and
formatter settings at the start of the named filename (see the
preceding description). The RETAIN option instructs TFORM that
when it resumes processing the current file, any changes in format
settings caused by commands in the secondary file should be kept in
effect.
3–132
11387 Tandem Computers Incorporated
Introduction to TFORM
SOURCE filename USE PROFILE RESTORE
This command tells TFORM to use any T-TEXT “profile” and formatter
settings at the start of the named filename (see SOURCE SKIP
RESTORE). The RESTORE option instructs TFORM that when it
resumes processing the current file, any changes in format settings
caused by commands in the secondary file should be superceded by the
settings defined in the current file.
SOURCE filename USE PROFILE RETAIN
This command tells TFORM to use any T-TEXT “profile” and formatter
settings at the start of the named filename (see SOURCE SKIP
RESTORE). The RETAIN option instructs TFORM that when it
resumes processing the current file, any changes in format settings
caused by commands in the secondary file should be kept in effect.
SOURCE filename VERBATIM
The VERBATIM option specifies that TFORM is to treat everything in
the secondary file, including commands and escape sequences, as text.
If you try to read in a T-TEXT file with the VERBATIM option, TFORM
issues an error message and ignores the command.
11387 Tandem Computers Incorporated
3–133
Introduction to TFORM
Tips
If the secondary file you name is an EDIT file instead of a T-TEXT file,
TFORM ignores any profile-oriented options.
Because the idea of a T-TEXT profile is inherent in the SOURCE SKIP or
SOURCE USE commands, the word PROFILE in the command line is
optional.
You can use the RETAIN and RESTORE options with or without the
SKIP and USE options.
RETAIN and RESTORE options do not affect values you assign to
variables with ASSIGN commands. Once a value is assigned, the
variable retains that value until another ASSIGN command gives it a
new one.
If you frequently use a set of formatting commands and macros, you
might find it convenient to put them all in a separate file. You would
then use a single SOURCE command in your text file to invoke them.
You would also be able to share the file containing formatting
commands and macros among any number of different text files.
A file you read in with the SOURCE command can itself contain a
SOURCE command to read in another file, which can in turn read in a
third file, and so on. The maximum number of input files that can be
open at one time is 32.
3–134
11387 Tandem Computers Incorporated
Introduction to TFORM
SPACE
The SPACE command advances the paper a specified distance.
What to Enter
\SPACE [ num [ units ] [ PAGE ] ]
Examples:
\SPACE 4 INCHES
\SPACE 12.5
\SPACE 30 PICAS PAGE
How to Use SPACE
The different options of the SPACE command are described separately on
the following pages.
SPACEnum [ units ]
This command spaces vertically, to the nearest half line, the specified
distance. For example, SPACE 1.3 INCHES, assuming a vertical pitch
of 6 lines per inch (the default), works out to 7.8 lines, so TFORM spaces
8 lines. If you omit the units, TFORM assumes you want LINES.
A SPACE command can continue onto the next page. If you enter
SPACE 36, for example, and only 24 lines remain on the current page,
TFORM spaces those 24 lines plus 12 lines on the next page.
Keyword PAGE
The optional PAGE modifier tells TFORM to space the distance you
specify or to the bottom of the current page, whichever comes first.
TFORM discards any excess spacing.
11387 Tandem Computers Incorporated
3–135
Introduction to TFORM
Tips
To avoid unnecessary white space at the top of a page, TFORM discards
any blank lines, such as gaps between paragraphs, when they fall at a
page break. TFORM always obeys the SPACE command, however,
regardless of where the spacing occurs. This is useful when you need
to leave space—perhaps for an illustration—at the top of a page.
Interline spacing does not affect the SPACE command. That is, a
command such as SPACE 5 spaces 5 single lines even if double or triple
spacing is in effect.
TFORM ignores the keyword PAGE if the SPACE command is within
the scope of a KEEP command. KEEP may move lines to the next page,
so TFORM cannot determine how much space is left on a page.
A SPACE command at the beginning of a paragraph overrides the
paragraph gap setting for that paragraph.
If you are not using a 5530 printer, TFORM rounds the value in a
fractional SPACE num command to the nearest number of whole lines.
The SPACE command also causes a line break.
3–136
11387 Tandem Computers Incorporated
Introduction to TFORM
STYLE
The STYLE command specifies formatting conditions that normally refer to
the entire document; you should usually put STYLE commands at the
beginning of the input file, before any text, or immediately after a NEW
command.
What to Enter
CHANGES ALTERNATE
FONT num "string"
FORM
LENGTH
WIDTH
num [ units ]
GAP
HEADER
FOOTER
[[+|—]num [units]]
TOP
BOTTOM
LEFT
RIGHT
\STYLE
MARGIN
HEADER
LEFT
RIGHT
FOOTER
LEFT
RIGHT
PARAGRAPHS
BOTTOM [int]
TOP [int]
GAP
INDENT
SENTENCES
11387 Tandem Computers Incorporated
[[+|—]num [units]]
[+|—]num [units]
VERBATIM
int
VERBATIM
3–137
Introduction to TFORM
Examples:
\STYLE FONT 4 "0,8U,0,10,12,0,3,3"
\STYLE FORM LENGTH 65 PICAS
\STYLE GAP HEADER 1
\STYLE MARGIN HEADER LEFT 5 CHARS
\STYLE PARAGRAPHS GAP 2.5
How to Use STYLE
STYLE commands normally appear at the beginning of an input file, before
you enter any text. You can change the style of the document later, but if
you change any options that affect the page layout, such as form size or
margins, you must do it at the beginning of a page—in this case, your
STYLE commands should follow an explicit NEW command, with no
intervening text. You can, however, change the style of paragraphs or
sentences within a page.
If you use STYLE without any options, TFORM resets all the STYLE
command options to their defaults.
The individual components of the STYLE command are described
separately on the following pages.
3–138
11387 Tandem Computers Incorporated
Introduction to TFORM
STYLE CHANGES ALTERNATE
STYLE CHANGES ALTERNATE tells TFORM to print change bars on
the left side for even-numbered pages and on the right side for oddnumbered pages. This feature causes the change bars to appear on the
outside borders of facing pages of an open manual.
The default condition for STYLE CHANGES ALTERNATE is STYLE
CHANGES, which tells TFORM to print the change bars on the right
side of every page.
STYLE FONT num "string"
The FONT option describes the font that TFORM is to use when
printing the document. When you use this option, you must specify all
eight font characteristics. These characteristics include page
orientation, symbol set, spacing, pitch, height, style, stroke weight, and
typeface. Refer to Appendix H for details. If you do not specify this
option, TFORM uses the defaults.
This option also defines a font number and its characteristics that can be
used with the FONT rendition control escape sequence. Refer to
Section 4 under “Rendition Controls” for more information.
STYLE FORM Options
The FORM options tell TFORM the size of the paper.
You can use any units you choose. If you use variable units, such as
CHARS, TFORM determines the actual measurement from the current
pitch setting. If you don’t specify any units, TFORM assumes you
mean INCHES.
STYLE FORM with no options at all resets both length and width
measurements to their defaults (as described above).
STYLE FORM LENGTH
You use this command to provide TFORM with the length of your
page size. STYLE FORM LENGTH, with no value for num, resets
the form length to its default setting, which is STYLE FORM
LENGTH 11 INCHES.
11387 Tandem Computers Incorporated
3–139
Introduction to TFORM
STYLE FORM WIDTH
This command provides TFORM with the width of your desired
page size. STYLE FORM WIDTH, with no value for num, resets the
form width to its default setting, which is STYLE FORM WIDTH
8.5 INCHES.
STYLE GAP Options
The GAP options specify the amount of space between the lowest
header and the first line of text, or the space between the last text line
and the topmost footer.
STYLE GAP, with no options at all, resets both gaps to their defaults (as
described below).
STYLE GAP HEADER num units
This command, using your specified num and units, sets the
header gap to a number of lines, computed to the nearest half line,
equivalent to num units.
STYLE GAP HEADER, with no value for num, resets the named gap
to its default value. The default header gap is STYLE GAP
HEADER 0, if no header is defined for the current page (text starts
at the top margin), or STYLE GAP HEADER 1, if any headers exist.
STYLE GAP HEADER +num
This command adds to the current gap setting. Again, you can use
any units; TFORM converts the new gap value to lines, computed
to the nearest half line. If you don’t specify any units, TFORM
assumes you mean LINES.
STYLE GAP HEADER -num
This command works exactly as the STYLE GAP HEADER +num
command does, except that TFORM subtracts from, rather than
adds to, the current header gap setting.
3–140
11387 Tandem Computers Incorporated
Introduction to TFORM
STYLE GAP FOOTER commands
These commands work in exactly the same way as the STYLE GAP
HEADER commands.
STYLE GAP FOOTER, with no value for num, resets the named gap
to its default value. The default footer gap is STYLE GAP FOOTER
0, if no footer is defined for the current page (text continues to the
bottom margin), or STYLE GAP FOOTER 1, if any footers exist.
STYLE MARGIN Options
The MARGIN options establish the margins between the edges of the
form and the formatted output, at top and bottom, to the left and right
of the headers and footers, and to the left and right of the text region
(the text margins can be different from the header or footer margins).
STYLE MARGIN, with no options whatsoever, resets all four text
margins, both header margins, and both footer margins to their
respective defaults (as described below).
STYLE MARGIN TOP num units
This command tells TFORM how much space should precede the
first header line (if any).
STYLE MARGIN TOP, with no value for num, resets the top margin
to its default value, which is STYLE MARGIN TOP 0.5 INCH.
STYLE MARGIN TOP +num
This command adds to the current margin setting. If you don’t
specify any units, TFORM assumes you mean INCHES.
STYLE MARGIN TOP -num
This command works exactly as the STYLE MARGIN TOP +num
command does, except that TFORM subtracts from, rather than
adds to, the current top margin setting.
11387 Tandem Computers Incorporated
3–141
Introduction to TFORM
STYLE MARGIN BOTTOM Commands
These commands work exactly the same as the STYLE MARGIN
TOP commands, but reference the space below the last footer line
(if any).
STYLE MARGIN BOTTOM, with no value for num, resets the
bottom margin to its default value, which is STYLE MARGIN
BOTTOM 0.5 INCH.
STYLE MARGIN LEFT num units
You use this command to set the amount of space between the left
edge of the form and the leftmost character of the text region to num
units.
STYLE MARGIN LEFT, with no value for num, resets the left
margin to its default setting, which is STYLE MARGIN LEFT 0.75
INCH.
STYLE MARGIN LEFT +num
This command adds to the current margin setting. If you don’t
specify any units, TFORM assumes you mean INCHES.
STYLE MARGIN LEFT -num
This command works exactly as the STYLE MARGIN LEFT +num
command does, except that TFORM subtracts from, rather than
adds to, the current left margin setting.
STYLE MARGIN RIGHT num units
You use this command to set the amount of space between the last
character of text (excluding marginal printing such as change marks
and sequence numbers) and the right edge of the form to num
units.
STYLE MARGIN RIGHT, with no value for num, resets the right
margin to its default setting, which is STYLE MARGIN RIGHT 0.75
INCH.
3–142
11387 Tandem Computers Incorporated
Introduction to TFORM
STYLE MARGIN RIGHT +num
This command adds to the current margin setting. If you don’t
specify any units, TFORM assumes you mean INCHES.
STYLE MARGIN RIGHT -num
This command works exactly as the STYLE MARGIN RIGHT +num
command does, except that TFORM subtracts from, rather than
adds to, the current right margin setting.
STYLE MARGIN HEADER LEFT num units
This command provides TFORM with the setting for the amount of
space between the left edge of the form and the first character of the
header region.
STYLE MARGIN HEADER LEFT, with no value for num, resets the
left header margin to its default value, which is STYLE MARGIN
HEADER LEFT 0.75 INCH (the same as the setting of the text
region left margin).
STYLE MARGIN HEADER LEFT +num
This command adds to the current header margin setting. If you
don’t specify any units, TFORM assumes you mean INCHES.
STYLE MARGIN HEADER LEFT -num
This command works exactly as the STYLE MARGIN HEADER
LEFT +num command does, except that TFORM subtracts from,
rather than adds to, the current left header margin setting.
STYLE MARGIN HEADER RIGHT num units
This command provides TFORM with the setting for the amount of
space between the last character of the header region and the right
edge of the form.
STYLE MARGIN HEADER RIGHT, with no value for num, resets
the right header margin to its default value, which is STYLE
MARGIN HEADER RIGHT 0.75 INCH (the same as the setting of
the text region right margin).
11387 Tandem Computers Incorporated
3–143
Introduction to TFORM
STYLE MARGIN HEADER RIGHT +num
This command adds to the current header margin setting. If you
don’t specify any units, TFORM assumes you mean INCHES.
STYLE MARGIN HEADER RIGHT -num
This command works exactly as the STYLE MARGIN HEADER
RIGHT +num command does, except that TFORM subtracts from,
rather than adds to, the current header margin setting.
STYLE MARGIN HEADER with no value resets both header
margins to their default values, which are the same as the settings
of the respective text region margins; these are STYLE MARGIN
HEADER LEFT 0.75 INCH and STYLE MARGIN HEADER RIGHT
0.75 INCH.
STYLE MARGIN FOOTER Commands
You use these commands in exactly the same way as STYLE
MARGIN HEADER commands, except that they refer to the
margins to the left and right of the footer region.
STYLE MARGIN FOOTER with no value resets both footer margins
to their default values, which are the same as the settings of the
respective text region margins; these are STYLE MARGIN FOOTER
LEFT 0.75 INCH and STYLE MARGIN FOOTER RIGHT 0.75
INCH.
STYLE PARAGRAPHS Options
The PARAGRAPHS options control spacing between paragraphs,
indentation of the first line of a paragraph, and protection from widows
and orphans. (In publishing terminology, a widow is the bottom line of
a paragraph, split off when a page or column break occurs and
stranded by itself at the top of the next page or column. An orphan is
the top line of a paragraph that is left behind at a break while the rest of
the paragraph is moved to the top of the next page or column.)
3–144
11387 Tandem Computers Incorporated
Introduction to TFORM
You can do all paragraph styling on a paragraph-by-paragraph basis.
Each STYLE PARAGRAPHS command takes effect with the beginning
of the next paragraph. However, you must issue a SET JOIN ON
command for STYLE PARAGRAPHS commands to have any effect at
all.
STYLE PARAGRAPHS, with no options at all, resets both gap and
indentation to their respective defaults, described below.
STYLE PARAGRAPHS BOTTOM int
This command tells TFORM that the last int lines of a paragraph
are always to remain together, even if it means that TFORM must
insert a page break before reaching the bottom of the page.
Specifying zero for int turns off widow control.
STYLE PARAGRAPHS BOTTOM with no value resets widow
control to its default value, which is two lines (although two lines
can be broken off to start the next page, one line can’t).
STYLE PARAGRAPHS TOP int
This command tells TFORM that the first int lines of a paragraph
are always to remain together, even if TFORM is forced to insert a
page break before starting the paragraph. Specifying zero for int
turns off orphan control.
STYLE PARAGRAPHS TOP with no value resets orphan control to
its default value, which is two lines (although two lines can remain
at the bottom of a page, one line can’t).
STYLE PARAGRAPHS GAP num units
You use this command to specify that TFORM is to insert a number
of blank lines between each paragraph and the one that follows.
TFORM computes the blank lines to the nearest half line, equivalent
to num units. If you omit units, TFORM assumes you mean
LINES.
11387 Tandem Computers Incorporated
3–145
Introduction to TFORM
When you define an interparagraph gap with the STYLE command,
TFORM outputs exactly that number of blank lines, regardless of
the spacing between paragraphs in the input file. (Since TFORM
defines a paragraph as “the text that exists between blank lines,”
you must separate paragraphs by blank lines in your input file.
You can use commands that signal the start of a new paragraph in
addition to their own functions—BREAK PARAGRAPHS,
FOOTER, HEADER, NEW, STYLE, and TITLE—in place of blank
lines.) If you set the gap to zero, TFORM removes all blank lines
between paragraphs.
TFORM, however, does take into account the interline spacing
defined by the SET SPACING command. For example, if double
spacing is in effect, TFORM considers a “line” to be an actual line
followed by an automatically-inserted blank line; under this
condition, STYLE PARAGRAPHS GAP 1 causes TFORM to insert a
triple space between paragraphs the automatic blank line after the
last line of the paragraph, then the double-height interparagraph
line. This keeps the paragraph gap proportional to the paragraphs
themselves.
STYLE PARAGRAPHS GAP, with no value for num, resets the
paragraph gap to its default setting, which is STYLE
PARAGRAPHS GAP VERBATIM.
STYLE PARAGRAPHS GAP +num
This command adds to the current interparagraph gap setting.
STYLE PARAGRAPHS GAP -num
This command works exactly as the STYLE PARAGRAPHS GAP
+num command does, except that TFORM subtracts from, rather
than adds to, the current interparagraph gap setting.
STYLE PARAGRAPHS GAP VERBATIM
This command tells TFORM to output the number of blank lines
that are actually present in the input file.
3–146
11387 Tandem Computers Incorporated
Introduction to TFORM
STYLE PARAGRAPHS INDENT num units
You use this command to tell TFORM to indent the first line of each
paragraph num units from the left margin. If you omit the units
TFORM assumes you mean CHARS.
STYLE PARAGRAPHS INDENT, with no value for num, resets the
paragraph indentation to its default setting, which is STYLE
PARAGRAPHS INDENT VERBATIM.
STYLE PARAGRAPH INDENT + num
This command adds to the current indentation.
STYLE PARAGRAPH INDENT - num
This comand subtracts from the current indentation. If the
indentation is less than zero, a “hanging indent” results, with the
first line beginning to the left of the body of the paragragh.
Negative indentation cannot extend beyond the left edge of the
form (as modified by the PRINT OFFSET command).
STYLE PARAGRAPHS INDENT VERBATIM
This command sets the first-line indentation to whatever actually
exists in the input file.
11387 Tandem Computers Incorporated
3–147
Introduction to TFORM
STYLE SENTENCES Options
The SENTENCES options allow you to specify the number of spaces
that follow output sentences. SET JOIN ON must be in effect for this
feature to work.
When joining is on, TFORM looks for sentence endings so that it can
adjust the spacing following each sentence. TFORM uses the following
algorithm to identify a sentence ending.
1. A word is followed by a period, colon, question mark, or exclamation
point. “Word” is defined as two or more lowercase letters, unless
uppercase is specified.
2. The punctuation marks in item 1 above are followed by an additional
punctuation character in this set
" ' ) ] } > / \
This character is optional.
3. The punctuation marks in items 1 or 2 above are followed by at least
one space and a capitalized word, or by the end of the input line (the
capitalized word is not required in the case of a colon, but otherwise
this condition is mandatory). One of the characters in the
set " ’ ( [ { < / $ % can optionally precede the capitalized word.
STYLE SENTENCES int
This command tells TFORM to follow sentences with int spaces,
regardless of the number of sentence-separating spaces in the input
file. The value of int must be 0, 1, or 2.
3–148
11387 Tandem Computers Incorporated
Introduction to TFORM
STYLE SENTENCES VERBATIM
You use this command to tell TFORM not to adjust sentence
endings at all. (However, if a sentence ends at the end of an input
line, TFORM inserts two spaces after it since there might be room
on the output line to start the next sentence.)
STYLE SENTENCES, with no options at all, sets sentence styling to
its default, which is STYLE SENTENCES 2.
Tips
If you use a flexible unit (CHARS or LINES) in a STYLE command that
affects page layout (STYLE FORM, STYLE GAP, or STYLE MARGIN),
TFORM computes the actual measurement from the pitch setting at the
time it encounters the STYLE command. That measurement remains
constant for the remainder of the document or until you issue another
STYLE command that changes it. On the other hand, changes in pitch
affect measurements for paragraph gap and paragraph indentation, if
you use variable units as the units of measurement.
Although STYLE PARAGRAPHS GAP int overrides the actual
number of blank lines in the output file, a SPACE command at the
beginning of a paragraph overrides the gap specification; TFORM
outputs the vertical spacing specified in a SPACE command instead of
the specified gap. TFORM treats a SPACE command at the end of a
paragraph, however, as though it were embedded in the paragraph. It
produces the amount of space it calls for, but doesn’t override the gap,
because a SPACE command doesn’t end a paragraph.
The paragraph and sentence forms of the STYLE command cause both a
line break and a paragraph break.
11387 Tandem Computers Incorporated
3–149
Introduction to TFORM
The algorithm TFORM uses to add spaces in sentences places one space
between words within a sentence and two spaces after sentences
(determining the end of a sentence with the conditions listed above).
Two unusual conditions cause TFORM to add only one space instead of
two between sentences
a.
The first case is a sentence ending with a single character; for
example, “We now move on to Category 3.” TFORM doesn’t
recognize single characters as words, so to TFORM, the sentence
has not ended.
b. The second case is a sentence that does not begin with a letter; for
example, “1849 was a year of gold fever.” Here, TFORM does not
see a new sentence starting.
To correct these anomalies, you can use the STYLE SENTENCES
VERBATIM command or add a required blank character (\#, a
metacharacter described in Section 4) after the punctuation to ensure an
extra space.
If you are not using a 5530 printer, TFORM rounds a fractional num
value to the nearest number of whole lines.
3–150
11387 Tandem Computers Incorporated
Introduction to TFORM
Temporary Indentation You use the TI command to indent a single output line of your document.
(TI) The TI command always refers to one, and only one, OUTPUT line.
What to Enter
\TI [ + | - ] num [ units ]
num
specifies the number of units to indent the affected input lines. If you
put a plus or minus sign before num, TFORM adds that amount to or
subtracts that amount from the existing indentation; if you omit the
sign, TFORM uses that amount as the actual indentation.
units
specifies the units of measurement used in the indentation; if you omit
it, TFORM assumes you mean CHARS.
Examples:
\TI +5 PICAS
\TI 12
\TI -15 MM
11387 Tandem Computers Incorporated
3–151
Introduction to TFORM
How to Use TI
If you want to indent just one OUTPUT line, you can use the TI command.
It has a similar syntax to an INDENT command, but this command has no
range because it only affects a single line. Note also that you can’t specify
LEFT, RIGHT, or BOTH; the TI command indents on the left side only. This
command must be entered on a line by itself, and the text line to be
indented must immediately follow the command line.
TI num
This command tells TFORM how far to indent the text line that
immediately follows the TI command line. TFORM uses num as the
indentation value; this value overrides the indentation currently in
effect for one output line only.
TI +num
You can use this command to add a value to the current indentation.
TFORM will indent the next single text output line by this additional
amount.
TI -num
This command tells TFORM to subtract a value from the current
indentation. TFORM will reduce the indentation of the next single text
output line by this new value.
Tips
You must remember to follow the TI command immediately with text
on the next line. The TI command will not work if another command or
a blank line intervenes between the TI command and the text line you
want indented.
Using a signed value for num gives TFORM a value that is relative to
the indentation currently in effect for your document. You may find it
easier to tell TFORM to add or subtract from the current indentation,
rather than providing an absolute (unsigned) value for num and having
to calculate its effect on the indentation yourself.
3–152
11387 Tandem Computers Incorporated
Introduction to TFORM
TIME
The TIME command calls the TIME macro, which uses a system variable,
SYS_TIME, to assemble the current time in a standard format. You can use
SYS_TIME to include the current time anywhere in your document.
What to Enter
\TIME
How to Use TIME
When you use this command, TFORM completes several steps
Assembles the three system variables SYS_HOURS, SYS_MINUTES,
and SYS_SECONDS
Combines them into one entity
Adds leading zeroes if necessary
Places the result in the system variable SYS_TIME, which is undefined
until you use the TIME command
To use the command and the variable in your document, you need to first
enter the TIME command. At this point you are defining the variable. You
then place SYS_TIME in your input where you want the current time to
appear. Your input appears like this
\TIME
Happy New Year!
The time is now \(SYS_TIME\).
If you printed your document at 12 01 a.m., TFORM defines the variable
with the system time at that moment, and inserts the value into your
printed output
Happy New Year! The time is now 00 01 00.
Value substitution (indirection) is described in more detail in Section 4; see
Section 5 for a discussion of system variables.
11387 Tandem Computers Incorporated
3–153
Introduction to TFORM
TITLE The TITLE command lets you arbitrarily put a three-part title anywhere in
the text region.
What to Enter
\TITLE title
title
is a one-, two-, or three-field entity, depending on how you enter it. Its
syntax appears as
" [ text ] [ | [ text ] [ | [ text ] ] ] "
TFORM recognizes the vertical bars (|) as the field delimiters,
which divide title into left, center, and right fields. TFORM leftjustifies any field to the left of the first delimiter (or if you omit both
delimiters), centers any field positioned between the vertical bars,
and right-justifies any field to the right of the second delimiter.
Fields may be empty or space-filled, and you can use any
combination of the one, two, or three fields. Enclose a title in
quotation marks.
Examples:
\TITLE "CONFIDENTIAL || ADDENDUM"
\TITLE "| **Update to Comments** |"
\TITLE "NEW INFO | Latest TFORM Developments | 9/2/86"
3–154
11387 Tandem Computers Incorporated
Introduction to TFORM
How to Use TITLE
If you need to insert a title in your text, use the TITLE command. As with
any title, you can use any combination of one, two, or three fields to
produce a title line that is left-justified, centered, right-justified, or any
combination of these. You can also include the page number character (#)
to print the current page number.
The TITLE command causes both a line break and a paragraph break.
Tips
The CONTENTS, FOOTER, HEADER, and LEVEL commands use the title
entity as a customizing option. You might refer to these commands for
more examples of titles.
11387 Tandem Computers Incorporated
3–155
Introduction to TFORM
TODAY The TODAY command calls the TODAY macro, which manipulates a
system variable, SYS_DATE, so that you can include today’s date in your
document in any of several formats. You can alter the actual date with the
CHANGE option.
What to Enter


\TODAY


 SHORT ["char"]
 LONG



  USA 

  WORLD [ "m1‚...‚m12" ]


 
CHANGE [ exp1 exp2 exp3˚]


m1,...,m12
are names or abbreviations of the twelve months of the year. All twelve
months must be designated and enclosed in quotation marks.
exp1
is a one- or two-character numeric expression that represents the
number of the month.
exp2
is a one- or two-character numeric expression that represents the
number of the day.
exp3
is a one- or two-character numeric expression that represents the
number of the year.
3–156
11387 Tandem Computers Incorporated
Introduction to TFORM
Examples:
\TODAY SHORT WORLD
\TODAY SHORT " "
\TODAY LONG WORLD "JAN.,FEB.,...DEC."
\TODAY CHANGE 6 21 86
How to Use TODAY
When you use this command, TFORM completes several steps
Assembles the three system variables SYS_MONTH, SYS_DAY, and
SYS_YEAR, together with appropriate separators and other characters
Combines them into one entity
Places the result in the system variable SYS_DATE, where you can
access it for inclusion in a title or similar use (see “Tips”); this
variable is undefined until you precede it with a TODAY command
The different options of the TODAY command are described separately in
the following paragraphs.
TODAY SHORT USA
TODAY SHORT USA (or simply TODAY SHORT) uses digits to format
the current date. TFORM assembles the date as MM/DD/YY, where
DD is the number of the day, MM the month number, and YY the last
two digits of the year.
If you just type TODAY with no options, TFORM formats the date as
TODAY SHORT “/” USA “January,...,December”.
11387 Tandem Computers Incorporated
3–157
Introduction to TFORM
TODAY SHORT WORLD
In this command, TFORM uses the European convention of listing the
day before the month and replaces the slashes with periods. The date is
formatted as DD.MM.YY.
TODAY SHORT "char"
You can add char to the TODAY SHORT command to redefine the
field separator to whatever character you choose. For example,
TODAY SHORT ”-” formats the date as MM-DD-YY. Remember to
enclose char in quotation marks.
TODAY LONG USA
TODAY LONG USA (or simply TODAY LONG) tells TFORM to write
out the date in full, using the month-day-year format. An example of
such a date is July 25, 1986.
TODAY LONG WORLD
TODAY LONG WORLD uses the European convention when spelling
out the date 25 July 1986.
TODAY LONG { USA | WORLD } "m1,...,m12"
When you use this command (using either the USA or WORLD
modifiers), you can change the month designators to reflect any
alternate way of spelling them out. However, you must specify all
twelve months if you specify any. For example, you can format the
date December 18, 1986, as Dec. 18, 1986. The string of month
designators must be enclosed in quotation marks.
3–158
11387 Tandem Computers Incorporated
Introduction to TFORM
TODAY CHANGE exp1 exp2 exp3
If you want to use a date other than the actual current date supplied by
TFORM, use this option of the TODAY command. Defining the three
exp values sets up the conditions for the TODAY command so it can
reassign new values to the SYS_DATE variable. To use this option, you
follow these three steps
1. Enter the TODAY CHANGE command with the components of the
new date. All three numeric expressions must be present. The year
number is usually the last two digits, but TFORM accepts all four
digits.
2. Enter the TODAY command with the option you want—for example,
SHORT WORLD or LONG USA—so TFORM knows how to format
your changed date.
3. Use the SYS_DATE where you want TFORM to insert the new date
into your text.
11387 Tandem Computers Incorporated
3–159
Introduction to TFORM
Tips
To use the command and the variable in your document, you need to
first enter the TODAY command. At this point you have defined the
variable. You then place SYS_DATE in your input where you want the
current date to appear. If you include SYS_DATE in a header, for
example, your input might look like this
\TODAY SHORT USA
\HEADER " \(SYS_DATE\) | Internal Document | Page # "
When you print your document, TFORM defines the variable with the
system date on that day and inserts that date into your printed output.
Your header would print like this
7/25/86
Internal Document
Page 4
In this example, TFORM also inserts the page number; see the
description of the FOOTER or HEADER command for more details.
When you use the CHANGE option, enter the numbers in the order
MM|DD|YY. You must follow a TODAY CHANGE command with a
TODAY command to tell TFORM which format you want for the new
date. TFORM then builds a new SYS_DATE by using the new values
you supply.
If you change the system date then want to reinstate the current actual
date, enter the TODAY CHANGE command with no options. This
resets SYS_DATE to the current date. At the next TODAY command,
TFORM rebuilds the SYS_DATE variable using current values and the
specified format of the TODAY command.
3–160
11387 Tandem Computers Incorporated
Introduction to TFORM
VERBATIM The VERBATIM command tells TFORM to treat everything it sees in a file
as text and to print the specified range of lines in a file exactly as it appears.
Using the VERBATIM command allows you to print a file without TFORM
executing any of the commands.
What to Enter
 int 
\VERBATIM  BLANK


Examples:
\VERBATIM
\VERBATIM 30
\VERBATIM BLANK
11387 Tandem Computers Incorporated
3–161
Introduction to TFORM
How to Use VERBATIM
You use the VERBATIM command if you want to temporarily suspend any
text formatting. Your output will be printed exactly as it appears in the file.
VERBATIM int
This command causes TFORM to treat the next int input lines as text
and to print them exactly as they appear in the input file, ignoring any
commands and escape sequences.
VERBATIM, with no modifier, assumes 1 as the int and prints only the
next line exactly as it appears.
VERBATIM BLANK
VERBATIM BLANK tells TFORM to treat all subsequent lines as text
until it encounters a blank line.
Tips
Lines in the input file that are to be printed under control of the
VERBATIM command must fit within the current margins; there are no
other restrictions.
The VERBATIM command causes an implicit line break.
3–162
11387 Tandem Computers Incorporated
4 Escape Sequences
A trigger character in the first position of an input line signals the presence
of a command line. If TFORM sees a trigger character elsewhere in a line, it
expects to find an escape sequence (although an escape sequence can occur
at the beginning of a line as well). TFORM can tell by the context whether
the entity following a trigger is indeed an escape sequence or something
else, such as a comment. “Escape sequence” is an historical term, arising
from the fact that the ESCape character (ASCII code 27) was sometimes
used to signal such entities.
This section describes the TFORM escape sequences. They are used to
define formatting metacharacters, rendition controls, and indirection
escape sequences (also known as value substitutions).
Note
In the following illustration of rendition control and indirection escape sequences, spaces
have been added for easier reading. However, TFORM will view these spaces as actual
characters when it processes a file, so add spaces with care.
Metacharacters
A trigger followed by one of these single nonalphabetic characters
(! - # . < > & or =) is called a metacharacter; when embedded in your text,
a metacharacter tells TFORM to perform a special formatting activity.
TFORM normally does not print metacharacters. If you want TFORM to
print a metacharacter you must insert a second trigger character in front of
the metacharacter. These two trigger characters, called a literal trigger
metacharacter, specifies that the trigger character is to be printed as text.
Metacharacters control such formatting activities as tabulation,
backspacing, and mandatory blanks and returns.
11387 Tandem Computers Incorporated
4-1
Escape Sequences
Comment Metacharacter
The comment metacharacter is a trigger character followed by an
exclamation point. It looks like this:
\!
When TFORM sees this character anywhere in a text or command line, it
considers this character and everything else on the line to be a comment;
thus, it will not print them. If it appears in the first column, TFORM ignores
the entire line. (See the description of the COMMENT command.)
Discretionary Hyphen
The discretionary hyphen is a trigger character followed by a hyphen. It
looks like this:
\If this metacharacter is embedded in a word, and the word won't fit on the
current line, TFORM breaks it where the metacharacter appears instead of
where the hyphenation algorithm indicates. TFORM then replaces the
metacharacter with an actual hyphen. If hyphenation isn't necessary,
TFORM closes up the word as if the metacharacter weren't there.
Tabulation Symbol
The tabulation symbol is a trigger character followed by a “greater than”
sign. It looks like this:
\>
When TFORM sees this character, it inserts enough spaces to move the
print position to the next defined tab stop. Before printing the next tab
stop. If there are no tab stops to the right of the current print position,
TFORM starts a new line (there is always an implicit tab stop at the left
margin). Whenever TFORM sees a tab symbol in an input line, TFORM
does a line break before processing the line, even if joining is turned on.
4-2
11387 Tandem Computers Incorporated
Escape Sequences
Backspace Symbol
The backspace symbol is a trigger character followed by a “less than” sign.
It looks like this:
\<
When TFORM sees this metacharacter, it moves the print position to the
left one space before resuming printing. You can use this metacharacter to
print composite characters such as ¢, ≠, and 6. A number of other
possibilities exist, particularly for foreign-language applications. When
using proportional pitch, you may have to do some experimentation to
determine which character should be overprinted on which because of the
differences in character widths. You must also remember to double any
backslash character you use in a composite character. TFORM recognizes a
double backslash as a literal trigger and prints it as a single backslash.
Required Blank
The required blank is a trigger character followed by a “pound” sign. It
looks like this:
\#
TFORM prints this as a blank but handles it as if it were part of a word.
That is, if you have two words with \# between them instead of a blank,
TFORM prints them as two separate words, but keeps them on the same
line as if they were one word, does not insert extra space between them
when justifying, and does not compress the space between them when
using proportional pitch.
11387 Tandem Computers Incorporated
4-3
Escape Sequences
Required Carriage Return
The required carriage return is a trigger character followed by a period. It
looks like this:
\.
When TFORM sees this metacharacter, it inserts a break and starts a new
line. You must put this metacharacter at the end of an input line for it to be
recognized.
Word Concatenator
The word concatenator is a trigger character followed by an ampersand.
It looks like this:
\&
TFORM joins the word preceding this metacharacter to the word that
follows the \& with no intervening space, regardless of how much space
separates the words in the input file, even if the words are on separate
lines. You can also use this metacharacter to connect text in a macro to text
preceding or following the macro invocation. Think of this metacharacter
as word “glue.” It works only if joining is on.
Required Microspace
The required microspace is a trigger character followed by an “equals”
sign. It looks like this:
\=
This metacharacter represents a forward movement of 1/60th of an inch
(or 12 decipoints). TFORM generates this metacharacter to direct the
correct justification of proportional-pitch output printer on the 5530 letterquality printer. Users do not generally add this character to their files as a
formatting feature.
4-4
11387 Tandem Computers Incorporated
Escape Sequences
Rendition Controls
Rendition control escape sequences tell TFORM to custom-print given
segments of text (which you enclose in parentheses). You can nest an
escape sequence within another (boldface and overstrike, for example, or
subscript and underline) to achieve different printing effects. A nested
rendition control can begin anywhere within the scope of an outer one;
each closing escape parenthesis in sequence terminates the most recent
rendition control. Finally, rendition controls can act upon text that extends
over multiple lines.
A rendition control escape sequence consists of five parts. The trigger
character is first, signaling TFORM of the escape sequence. It is followed
by one of the words BOLD, DOWN, FONT, OVERSTRIKE, SHADOW,
UNDERLINE, or UP (or a three-letter abbreviation of any but the last). A
left parenthesis follows the keyword, and the text to be custom printed
comes next. Another trigger and a closing right parenthesis ends the
rendition control escape sequence.
The following examples illustrate how you can tell TFORM to boldface,
change fonts, overstrike, shadow type, subscript, superscript, or underline
text in your file.
Boldface Type
The BOLD rendition control specifies that the enclosed text is to be printed
in boldface type. It looks like this:
\BOLD ( text \)
The 5530 letter-quality printer does this by overprinting each character on
itself four times. All other supported printers overprint each character five
times. For example:
This line is printed in boldface type.
11387 Tandem Computers Incorporated
4-5
Escape Sequences
Changing Fonts
The FONT rendition control causes the enclosed text to be printed in the
specified font. It looks like this:
\FONTn ( text \)
n
is a number from 0 through 9. If the font number has been defined in a
STYLE FONT command, that font is used; otherwise, the default font 0
is used.
Examples:
\FONT2(This is a Title\)
The first FONT command TFORM encounters is \FONT2; therefore, the
following text is printed in font 2 until the \FONT4 command. Only the
word in parentheses is printed in font 4, then TFORM continues printing
the remaining text in font 2.
You are limited to only 10 fonts per TFORM page.
You can assign a new font to a font number by using the STYLE FONT
command. Refer to Section 3 for more information about the STYLE FONT
command.
Overstruck Type
The sequence OVERSTRIKE rendition overprints each nonblank character
in the enclosed text with the overstrike character, which is a hyphen by
default (to produce the “strikeout type” often used in legal documents). It
looks like this:
\OVERSTRIKE ( text \)
If you want to redefine the overstrike character to any other printable
character, you can do so with the DEFINE OVERSTRIKE command.
Overprinted text looks like this:
This line is printed in strikeout type.
4-6
11387 Tandem Computers Incorporated
Escape Sequences
Shadow Type
The SHADOW rendition control causes the enclosed text to be shadowprinted. It looks like this:
\SHADOW ( text \)
Only the 5530 letter-quality printer is capable of true shadow-printing,
which consists of printing a character, then printing it again 1/120th of an
inch to the right. Other printers print each character twice, producing an
effect that is darker than normal type but not as dark as boldface. Note that
you can use a combination of shadow type and boldface type to produce
exceptionally dark characters. For example:
This line is printed in shadow type.
This line uses both bold face and shadow type.
Subscripts
The DOWN rendition control causes the enclosed text to be printed onehalf line below the current line. It looks like this:
\DOWN ( text \)
Normally, TFORM moves the following lines down half a line to make
room for the subscript, unless you tell it not to with a SET SPACING FIXED
command. For example:
This line contains a subscript.
If the output device you are using cannot handle subscripts, TFORM issues
a warning message and prints the subscript as normal text on the current
line.
11387 Tandem Computers Incorporated
4-7
Escape Sequences
Superscripts
The UP rendition control the enclosed text to be printed one-half line above
the current line. It looks like this:
\UP ( text \)
Normally, TFORM moves the current line and all following lines down half
a line to make room for the superscript, unless you tell it not to with a SET
SPACING FIXED command. For example:
This line contains a superscript.
If the output device can't handle superscripts, TFORM issues a warning
message and prints the superscript as normal text on the current line.
Underlining
The UNDERLINE rendition control prints an underscore character under
every character in the enclosed text, including blanks. It looks like this:
\UNDERLINE ( text \)
If you want individual words to be underlined, you'll need to specify an
UNDERLINE escape sequence for each word.
One escape sequence completely underlines this line.
It took nine rendition controls to underline this
line.
4-8
11387 Tandem Computers Incorporated
Escape Sequences
Indirection Escape
Sequence
The keyword VALUE (possibly abbreviated) followed by a left parenthesis
(or just a left parenthesis immediately following the trigger) identifies an
indirection, or value substitution, escape sequence. Following any of these
is an expression to be evaluated, then another trigger and a closing right
parenthesis. It looks like this:
\VALUE ( exp \)
or simply:
\( exp \)
The indirection escape sequence works by evaluating the expression
enclosed within it, converting the expression to a string, and representing
that value in itself (which is why it can also be referred to as a value
substitution escape sequence).
Unlike rendition control escape sequences, the indirection escape sequence
can't have another escape sequence nested in it (although it can be nested
inside another). The expression can be of any type, but it must fit on one
line; you can't continue it onto a second input line. Since it converts
numeric entities to string types, it is useful when you require a string in an
expression. Even more importantly, it lets you embed an expression in a
line of text to make TFORM print something computed on the spot. For
example, assume you have the following line in your file:
Dear \(first_name\),
TFORM prints the actual current value of the expression first_name
(presumably read in from a name-and-address file) in place of the
indirection escape sequence.
11387 Tandem Computers Incorporated
4-9
Escape Sequences
In the following example, the ASSIGN command tells TFORM what values
to give to the two variables chapter_name and chapter_number:
20.
21.
22.
23.
\ASSIGN
\ASSIGN
This is
This is
chapter_name "Introduction"
chapter_number 1
Chapter chapter_number: chapter_name.
Chapter \(chapter_number\): \(chapter_name\).
Because there are no indirection escape sequences to identify the variable
names as variables in line 22, TFORM construes them as text and prints
line 22 as:
This is Chapter chapter_number: chapter_name.
Because line 23 contains indirection escape sequences, which take on the
values of their variables at the time TFORM encounters, TFORM prints line
23 as:
This is Chapter 1: Introduction.
See Section 5 for more details about variables, expressions, and their
evaluation.
4-10
11387 Tandem Computers Incorporated
Escape Sequences
Double Indirection
Another way of using the indirection escape sequence is with “double
indirection” (sort of “the-value-of-the-value-of"). You do this by doubling
the trigger character at the start and end of the escape sequence. Such an
escape sequence would look like this:
\\VALUE ( exp \\)
or simply:
\\( exp \\)
You use double indirection in commands that contain a title, primarily the
CONTENTS, HEADER, and FOOTER commands. TFORM performs a preexecution scan on such commands when it first encounters them,
evaluating any expressions they may contain. When TFORM finds
doubled triggers, it converts them to single triggers without evaluating the
contained expression. (Recall that TFORM interprets a doubled trigger
character as a literal trigger character, not as the beginning of a command
or escape sequence.) The expression remains enclosed as an indirection
escape sequence, ready to be evaluated whenever the command is
executed.
When TFORM does its pre-execution scan, it converts a standard
indirection escape sequence such as \( exp \) to the current value of exp; the
actual value appears at that point in the output. However, TFORM
converts \\( exp \\) with double triggers to \( exp \) and delays evaluation
of the expression.
11387 Tandem Computers Incorporated
4-11
Escape Sequences
TFORM does the pre-execution scan only once and stores the resulting
command image for future use. That's why, in the following example, you
don't have to issue a FOOTER command at the end of each page; TFORM
just keeps executing the saved one until you issue a new one:
\PAGE 1
\FOOTER "\\(sys_pagenumber\\)|\(sys_pagenumber\)|sys_pagenumber"
TFORM evaluates the FOOTER command to
\FOOTER "\(sys_pagenumber\)|1|sys_pagenumber"
when it first encounters it. Since TFORM does not scan it again, the title
remains like this when TFORM stores it. At the bottom of each page,
TFORM therefore prints
n
1
sys_pagenumber
where n represents the changing value of SYS_PAGENUMBER and prints
as the then-current page number for each page. The center portion is fixed
to the value of SYS_PAGENUMBER at pre-execution scan (here, the value
is page 1), and remains that way; the right-justified portion is, of course,
simply a string and is not evaluated.
You can use double indirection to insert section titles in headers, too, or in
other instances where you want the capability for constant updating.
When using indirection and double indirection, remember:
For a “one-shot” command that uses strings (such as TITLE), where
you want a value that is current both at the time of pre-execution scan
and at execution, use the indirection escape sequence without double
indirection: \( exp \).
For a command that uses strings and that TFORM executes repeatedly
(such as HEADER or FOOTER) in which you want a value that is
current at the time of each execution, use double indirection:
\( exp \\).
4-12
11387 Tandem Computers Incorporated
Escape Sequences
For a command that can evaluate its own expressions (such as ASSIGN
or FILE WRITE), it's best to use the expression alone, without any
indirection. However, if the expression yields a numeric value and a
string is required, you can use either the indirection escape sequence or
the STRING function (see Section 5) to convert the numeric value to a
string type.
For example, given the following source lines:
66.
67.
68.
69.
\ASSIGN tsuris "worry worry worry"
\FILE WRITE * \\(tsuris\\)
\FILE WRITE * \(tsuris\)
\FILE WRITE * tsuris
Pre-execution scan evaluates the three FILE WRITE commands to:
\FILE WRITE \(tsuris\)
\FILE WRITE worry worry worry
\FILE WRITE "worry worry worry"
When TFORM tries to execute these commands, the first two commands
cause syntax errors. The first is an error because \(tsuris\) is an invalid
variable name (a name must begin with a letter and can't contain characters
like backslashes or parentheses). The second is an error because TFORM
sees the three words as variable names separated by spaces and because
the FILE WRITE command requires its entities to be separated by commas
(WORRY is probably an undefined variable as well). The third command
works, printing the string “worry worry worry,” because TFORM had
stored this string from the ASSIGN command in line 66.
11387 Tandem Computers Incorporated
4-13
5 Expressions
Introduction
An expression is an item of data in various forms that TFORM evaluates to
a single value. TFORM expressions can be any of the following:
A single digit, a single-letter variable name, or a 1-character string (a
string is zero or more characters enclosed in quotation marks)
A combination of digits, with or without a decimal point, to make a
large number
A long variable name, perhaps containing multiple words joined by
underscore characters or perhaps enclosed in an indirection escape
sequence
A collection of letters, numbers, and punctuation marks (including
spaces), enclosed in quotes, that constitutes a longer string
A function name and a list of arguments for the function, enclosed in
parentheses
A combination of all of these with operators, which define activities to
be performed on the numbers, variables, or strings
Whenever TFORM sees an expression (in a place where expressions are
allowed), it evaluates that expression, performing whatever computations
and comparisons are necessary (specified in the expression by operators) to
reduce it to a single value. TFORM then uses the value as appropriate in
the execution of a command.
11387 Tandem Computers Incorporated
5-1
Expressions
Primary Expressions
TFORM expressions can be divided into two categories: primary and
complex expressions. A primary expression represents a single value.
TFORM evaluates all primaries before going on to evaluate higher ranking
entities. Primary expressions include constants, variables, and functions;
these are described below.
A constant is any expression that contains a value in its structure that can
never change. This kind of expression can be simple, such as a single digit
or an empty string; a combination of digits making up a number; or a
collection of characters in a string.
A variable is a kind of expression that represents a value of either numeric
or string type. You create these variables as you need them. A variable
must start with a letter; is limited to 32 characters; and can contain letters,
numbers, and underscore characters (which are used as word separators,
since spaces aren’t allowed).
Besides the variables you create, TFORM maintains a number of system
variables that you can access for use in expressions. You can read system
variables and use their values, but you can’t directly assign values to them.
A function also yields a single value, but instead of symbolically
representing a value (as a variable does), a function evaluates one or more
arguments and returns a value from that process. A function can produce
an object with a type or value that is different from the type or value of the
arguments the function evaluated.
You can use functions to do many things; for example, you can obtain the
absolute (unsigned) value of a number, convert numeric entities to strings
and vice versa, convert numbers to their Roman-numeral equivalents, find
the length of an expression in characters, find the larger (or smaller) of two
values, select one expression from a list of expressions, or isolate a
substring in a larger string.
5-2
11387 Tandem Computers Incorporated
Expressions
Complex Expressions
A complex expression is a group of primary expressions, also called
operands, that are combined with operators; the operators indicate actions for
TFORM to perform on the operands to evaluate the expression to a single
result. The types of operators, and the actions they perform, must match
the types of the operands (this is explained further under “Operands” and
“Operators” later in this section).
Expression Types
An expression is one of three types: string, numeric, or Boolean. TFORM
computes a value for an expression, depending on what operands and
operators you give, and that type is then associated with the expression.
TFORM can perform algebraic and logical calculations with expressions of
numeric or Boolean types; string types are viewed literally. When you
build complex expressions, TFORM can only evaluate operands of like
types. However, if you need to combine unlike elements (for example,
string and numeric elements), you can convert one element’s type to match
another’s by using the NUMERIC or STRING function (these functions are
detailed later in this section).
Examples of Expressions
Table 5-1 is a summary of the syntax of an expression, from the most
complex down to the simplest. The term “character” means any character
you can type in; “digit” is any ASCII numeral. The symbol “::=” means
“is defined as.”
To illustrate these expressions, spaces are added for improved readability.
However, TFORM views a space (except within a string) as the end of the
expression. You can’t have spaces anywhere else in an expression; the
exception is if the expression with spaces is enclosed in an indirection
escape sequence: \(x + y\), for example.
11387 Tandem Computers Incorporated
5-3
Expressions
Table 5-1.
Syntax of an Expression
Entity
Example
::=
conjunction [ // expression ]
sooner/later
conjunction ::=
comparison [ && conjunction ]
salt&&pepper
expression
>
<
=
comparison
::=
sum
sum
var1 = var2; 5< >6
sum
3+5; string1&string2
term
dividend/divisor
> =
< =
< >
+
sum
:=
term
&
term
::=
factor
/
*
+
factor
::=
-
+5; –sinus; !on_your_life
primary
!
primary
::=
constant | variable | function | ( exp )
3; X; ARG(0): (3+4)
constant
::=
string | number
"Hello, sailor!" 3.14159
variable
::=
name
bean_counter
function
::=
name ( expression [ , expression ] ... )
MODULO(width,10)
digit
name
::=
letter
letter
...
a_fairly_long_name
-
Note
5-4
string
::=
" [ character [ character ] ... ]"
"Example"
number
::=
integer [ . integer ]
127; 2.72828
integer
::=
digit [ digit ] ...
1; 32768
Operands in an expression can be any of three types: string, numeric, or Boolean.
11387 Tandem Computers Incorporated
Expressions
Variables
A variable is a name that represents a value. You create your variables and
assign it a value. The name must begin with a letter; the remaining
characters may be letters, numbers, and/or underscore (_) characters. A
variable name is restricted to 32 characters; if TFORM finds a name longer
than that, it issues an error message. You can use variable names that are
as short as you like, but it’s advisable to use enough characters to make the
names meaningful. For example, FIRST_NAME is much more descriptive
than FN, especially if a long time has passed since you last looked at it.
You use the ASSIGN, FILE READ, or LEVEL REFERENCE command to
assign a value to your variable (these commands are described in Section
3). A variable with no value has no inherent type (numeric or string), but
once you assign it a value, it assumes the type of that value and becomes
subject to the usage rules for that type. If you later assign another value to
the variable, it assumes the type of that value.
System Variables
In addition to the variables you create, TFORM maintains a set of system
variables that you can refer to and use in expressions; you cannot,
however, assign values directly to them—TFORM assigns appropriate
values when you use these variables.
System variables keep track of such things as the current page number, the
input-file line number being processed, the sizes of the margins, the current
tab stop settings, the current section title, today’s date, and the time (down
to the second) at which the formatting run began. TFORM stores other
data in system variables as well, such as line height; line width; items
defined by DEFINE, PRINT, and SET commands; and file information.
All of the names of TFORM-maintained variables begin with “SYS_” ; don’t
use the prefix SYS_ in the name of any of the variables you create.
The following are descriptions of all the system variables. The designations
(N) and (S) indicate whether a given variable is of numeric or string type.
SYS_BOTTOMMARGIN
TFORM stores in this variable the number of decipoints between the last
footer and the bottom of the form.
(N)
11387 Tandem Computers Incorporated
5-5
Expressions
SYS_CHARS
This variable is a string that contains the current values of control
characters that you can change by means of the DEFINE command.
The various characters in the string are shown in Table 5-2.
Table 5-2.
Position
1
2
3
4
5
6
7
8
9
10
11
12
13
SYS_CHARS Characters
Significance
Changed by
Command trigger
Change mark
Title field separator
Title page number
Box top
Box left side
Box right side
Box bottom
Box top left corner
DEFINE TRIGGER
DEFINE CHANGES
DEFINE TITLE FIELD
DEFINE TITLE PAGENUMBER
DEFINE BOX TOP
DEFINE BOX SIDE LEFT
DEFINE BOX SIDE RIGHT
DEFINE BOX BOTTOM
DEFINE BOX CORNER
TOP LEFT
DEFINE BOX CORNER
TOP RIGHT
DEFINE BOX CORNER
BOTTOM LEFT
DEFINE BOX CORNER
BOTTOM RIGHT
DEFINE OVERSTRIKE
Box top right corner
Box bottom left corner
Box bottom right corner
Overstrike character
You can access individual characters with the STRING function.
SYS_DAY
SYS_DAYOFWEEK
5-6
This variable contains an integer, in the range of 1 through 31, that
represents the current day of the month.
Default
\
|
|
#
–
|
|
–
–
–
–
–
–
(S)
(N)
This variable contains an integer, in the range of 1 through 7, that
represents the current day of the week. Sunday is 1, Monday is 2, and
so on.)
(N)
11387 Tandem Computers Incorporated
Expressions
SYS_DEVICETYPE
This variable contains an integer, 0 or 1, that represents the type of output
device in use. TFORM determines this value either from a PARAM
DEVICE^TYPE command or from the actual device type specified in the
RUN TFORM command. Device type 1 indicates the 5530 letter-quality
printer; 0 indicates any other type of Tandem supported printer.
(N)
SYS_FILECODE
TFORM assigns to this variable the GUARDIAN 90 file code (101 for an
EDIT file, 102 for a T-TEXT file) of the current input file.
(N)
SYS_FILEDATE
This variable contains the date on which the current input file was last
modified, in the form MM/DD/YYYY. MM is the month number (1-12),
DD is the day number (1-31), and YYYY is the year.
(S)
SYS_FILEERROR
After each execution of a FILE command, TFORM stores the
GUARDIAN 90 file system error code for the auxiliary file operation
in this variable (0 means no error occurred).
(N)
SYS_FILENAME
This variable contains the GUARDIAN 90 file-name (in external form) of
the current input file.
(S)
SYS_FILETIME
This variable contains the time at which the current input file was last
modified, in the form HH:MM:SS. HH is the hour number (0-23), MM the
minutes (0-59), and SS the seconds (0-59).
(S)
SYS_FORMLENGTH
SYS_FORMWIDTH
SYS_HOURS
SYS_INPUTLINENUM
This variable contains the length, in decipoints, of the form in use.
(N)
This variable contains the width, in decipoints, of the overall page use. (N)
This variable contains an integer, in the range of 0 through 23, that
represents the hour portion of the time of day at which you invoked
TFORM.
(N)
TFORM keeps the line number of the current source line in this variable. If
the input file is an EDIT file, this is the EDIT sequence number; otherwise,
this value is the number of lines read since TFORM opened the current
source file.
(N)
11387 Tandem Computers Incorporated
5-7
Expressions
SYS_LEFTINDENT
SYS_LEFTMARGIN
This variable contains the current indentation, in decipoints, from the
left margin setting stored in SYS_LEFTMARGIN. This value can be
negative.
(N)
This is the current setting of the text area left margin, in decipoints.
(N)
SYS_LINEHEIGHT
This variable contains the current height, in decipoints, of an output line in
the text region, computed from the current values for vertical pitch and
interline spacing.
(N)
SYS_LINEWIDTH
This is the current width, in decipoints, of a line of text, calculated from the
form width and the current left and right margins and indentation.
(N)
SYS_MACRONAME
This variable contains the name of whichever TFORM macro is currently
being executed, if any.
(S)
This variable contains an integer, in the range of 0 through 59, that
represents the minutes portion of the time of day when you invoked
TFORM.
(N)
This variable contains an integer, in the range of 1 through 12, that
represents the current month.
(N)
SYS_PAGENUMBER
TFORM keeps track of the current page number in this variable.
(N)
SYS_PARAGRAPHBOTTOM
This is the number of lines that are to remain together at the bottom of a
paragraph, defined by the most recent STYLE PARAGRAPH BOTTOM
command.
(N)
SYS_PARAGRAPHGAP
This is the amount of space, in decipoints, between paragraphs, as defined
by the most recent STYLE PARAGRAPH GAP command.
(N)
SYS_PARAGRAPHINDENT
This is the amount of indentation, in decipoints, that TFORM applies to
the first line of each paragraph, as defined by the most recent STYLE
PARAGRAPH INDENT command. This can be a negative value.
(N)
SYS_MINUTES
SYS_MONTH
SYS_PARAGRAPHTOP
5-8
This is the number of lines that are to remain together at the top of a
paragraph, defined by the most recent STYLE PARAGRAPH TOP
command.
11387 Tandem Computers Incorporated
(N)
Expressions
SYS_PRINTFLAGS
This is a string of characters that represent the current values of flags set by
the PRINT command. Each is either “1” or “0,” indicating true or false,
respectively. The various characters in the string are displayed in Table 53.
Table 5-3.
Position
1
2
3
4
5
SYS_PRINTFLAGS Characters
Significance
Changed by
Use draft mode formatting
Print error pages
Print pages manually
Print only changed pages
Print warning pages
PRINT DRAFT
PRINT ERRORS
PRINT MANUALLY ON
PRINT PAGES CHANGES
PRINT WARNINGS
Default
You can access individual characters through the use of the STRING
function.
0
1
0
0
0
(S)
SYS_RIGHTINDENT
This variable contains the current indentation, in decipoints, from the
right margin setting stored in SYS_RIGHTMARGIN. This value can be
negative.
(N)
SYS_RIGHTMARGIN
This is the current setting of the text area right margin, in decipoints.
SYS_SECONDS
(N)
This is an integer, in the range of 0 through 59, that represents the seconds
portion of the time of day when you invoked TFORM.
(N)
11387 Tandem Computers Incorporated
5-9
Expressions
SYS_SETFLAGS
This variable is a string of characters that represent flags set by the SET
command. Each is either “1” or “0,” indicating true or false, respectively.
The various characters in the string are displayed in Table 5-4.
Table 5-4.
Position
1
2
3
4
5
6
7
8
9
10
11
12
13
14
SYS_SETFLAGS Characters
Significance
Changed by
Box construction
Printing arrow in box
Change mark printing
Text downshifting
Error reporting
Word hyphenation
Hyphenation by syllables
Text joining
Text justification
Text line numbering
Fixed interline spacing
Existence of tab stops
Text unshifting
Warning reporting
SET BOX
SET BOX ON ARROW
SET CHANGES (or CHANGES)
SET DOWNSHIFT
SET ERRORS
SET HYPHENS
SET HYPHENS ON n ENGLISH
SET JOIN
SET JUSTIFY
SET SEQUENCING
SET SPACING n FIXED
SET TABS
SET UPSHIFT
SET WARNINGS
Default
0
0
0
0
1
0
1
0
0
0
0
0
0
0
You can access individual characters of the SYS_SETFLAGS string through
the use of the STRING function.
(S)
5-10
11387 Tandem Computers Incorporated
Expressions
SYS_STACKFLAGS
This variable is a string of characters representing flags that indicate
whether TFORM is currently processing lines within the scope of various
commands. Each is either “1” or “0,” indicating true or false, respectively.
The various characters in the string are shown in Table 5-5.
Table 5-5.
SYS_STACKFLAGS Characters
Position
1
2
3
4
5
Command
CENTER
CHANGES
INDENT LEFT|BOTH
INDENT RIGHT|BOTH
KEEP
You can access individual characters through the use of the STRING
function.
(S)
SYS_SYSTEM
This is the external name of the current system, used to expand file names
specified in SOURCE commands. Its initial value is the name of the system
on which you were running when you invoked TFORM.
(S)
SYS_TABS
This is a list, separated by commas, of the column numbers at which tab
stops are currently set.
(S)
SYS_TEXTAREALENGTH
This is the length, in decipoints, of the text region, computed from the form
length minus the total of headers, footers, gaps, and top and bottom
margins.
(N)
SYS_TEXTAREAUNUSED
TFORM maintains in this variable a count, in decipoints, of the text area
remaining on the current page that is not already occupied by text lines. (N)
SYS_TFORMVERSION
This is the current version of TFORM that is running on your system (for
example, T9605B30).
(S)
11387 Tandem Computers Incorporated
5-11
Expressions
SYS_TOPMARGIN
This is the number of decipoints between the top of the form and the first
header.
(N)
SYS_VOLUME
In this variable, TFORM keeps the external name of the current
volume/subvolume, for expansion of file names specified in SOURCE
commands. The initial value is the volume and subvolume you were in
when you invoked TFORM.
(S)
SYS_YEAR
Note
5-12
This is a 4-digit integer that represents the current year.
(N)
The following visible variables are maintained by TFORM-supplied macros. They are
undefined until the standard TFORMLIB macro library has been read in from
$SYSTEM.SYSTEM. This is done for you when you use any of the TFORM macro
commands—for example, using the TODAY command, which defines SYS_DATE, or
setting SYS_LNUM by using the BEGIN LIST COMMAND.
SYS_DATE
This is the string form of today’s date, maintained by the TODAY macro.
Its form depends on the way in which you last invoked the macro. The
default form is “MM/DD/YY” (2-digit representations of month, day,
and year).
(S)
SYS_LDESC
This variable contains the current label string for a descriptive list, taken
from the most recent ITEM expression.
(S)
SYS_LEVEL n_TITLE
These eleven variables (LEVEL0 through LEVEL10) contain the section
heading titles supplied by the latest invocations of the LEVEL n
macros.
(S)
SYS_LNUM
The LIST macro maintains a sequential item count for the item labels in a
descriptive list, storing it in this variable.
(N)
SYS_SECTION_NUM
This is the major section number (or letter) provided by the most recent
invocation of the LEVEL 0 macro.
(S)
11387 Tandem Computers Incorporated
Expressions
Operands
As defined before, operands are groups of constants or variables that are
combined with operators and then reduced to a single value. Before going
on to the operators, here are some things to remember about operands:
TFORM stores all numeric values as 32-bit binary data with an implied
decimal point 3 places from the right end, so the range for numeric
values is from –2147483.647 through +2147483.647.
Since a string must be enclosed in quotes, you need to use two
consecutive quotation marks to indicate that you’re using a quote as a
data character within a string; for example, “They all shouted ““LOOK
OUT!”” in unison.”
You can cause TFORM to think of a numeric value as a Boolean, or
logical, value: In a Boolean context, TFORM views zero as “false” and
anything else as “true.” When an expression produces a Boolean
result, it yields 1 for true, 0 for false.
You can’t combine two operands with one operator unless both
operands are of the same type (both numeric or both string); for
example, TFORM produces an error message for expressions such as
“K” +3.
Operators
Unary Operators
Operators define actions to be performed on one or two operands to
produce a single result. Operators are of three types:
1.
Unary operators use the value of a single operand.
2.
Binary operators specify arithmetic computation or string
manipulation involving two operands of the proper type.
3.
Logical operators specify comparisons and Boolean operations and
yield a Boolean result.
The unary operators are the algebraic + and – which affirm or negate the
algebraic sign of the numeric entity immediately following, and the
Boolean ! which negates the Boolean entity immediately following (logical
“not” ). See Table 5-6.
11387 Tandem Computers Incorporated
5-13
Expressions
Table 5-6.
Unary
Operator
+
–
!
Binary Operators
Operation
Type of
Operand
Type of
Result
Positive sign assignment
Sign complementation
Boolean negation ("not")
Numeric
Numeric
Boolean
Numeric
Numeric
Boolean
The binary operators are the algebraic +, –, *, and / which specify addition,
subtraction, multiplication, or division computations involving the two
numeric entities on either side of the operator; and the string concatenator
&, which joins the two string entities on either side of it. Table 5-7 displays
binary operators.
Table 5-7.
Binary Operators
Binary
Operator
Operation
Type of
Operand
Type of
Result
Algebraic addition
Algebraic subtraction
Algebraic multiplication
Algebraic division
String concatenation
Numeric
Numeric
Numeric
Numeric
String
Numeric
Numeric
Numeric
Numeric
String
+
–
*
/
&
5-14
Unary Operators
11387 Tandem Computers Incorporated
Expressions
Logical Operators
The logical operators are of two types: those that specify a comparison
between two numeric or two string operands and that yield a Boolean
result (true if the stated comparative relationship between the two
operands exists, false if it doesn’t); and those that combine two Boolean
entities to produce one Boolean value. They are shown in Table 5-8.
Table 5-8.
Logical Operators
Logical
Operator
Operation
>
<
=
>=
<=
<>
&&
//
Comparing Operand
Types
Greater than
Less than
Equal to
Greater than or equal to
Less than or equal to
Not equal to
Boolean "and"
Boolean inclusive "or"
Type of
Operand
Type of
Result
Numeric or string
Numeric or string
Numeric or string
Numeric or string
Numeric or string
Numeric or string
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Operands can be of numeric, string, or Boolean type; like operands are
compared with different criteria.
TFORM bases any comparison of numeric operands on algebraic values;
for example, 5 is greater than 4 but –5 is less than –4. On the other hand,
TFORM compares string operands on the basis of the ASCII collating
sequence; “greater than” is interpreted as “later in the collating sequence”
and “less than” is “earlier in sequence.” For example, “A” <“B” is true.
You can compare strings of different lengths; TFORM looks at the shorter
string as if it were filled in with trailing null characters (ASCII code 0) to
make it the same length as the longer string.
When combining Boolean operands, the truth of the result depends on the
truth of either or both of the operands, depending on the operator used.
For example, A&&B is true if—and only if—both A and B are true; A//B is
true if either A or B (or both) is true.
11387 Tandem Computers Incorporated
5-15
Expressions
Evaluation of
Expressions
In evaluating a compound expression, TFORM begins with entities that
already represent a single value each; these entities are called primaries.
TFORM next applies the effects of any unary operators (signed primaries,
or factors). Then it goes on to perform multiplication and division,
addition and subtraction, comparisons, and conjunctions (Boolean “and” ),
in that order. It reserves any Boolean “or” operations until the last.
Whenever TFORM finds more than one item of the same rank, it evaluates
them from left to right.
TFORM considers any expression enclosed in parentheses to be a primary;
this would include, for example, a function reference. TFORM evaluates all
primaries before going on to the next-ranking entity. Therefore, you can
use parentheses to alter the sequence of evaluation. Note the results of
different uses of parentheses:
1+2*3–4 = 3
1+2*(3–4) = –1
(1+2)*3–4 = 5
(1+2)*(3–4) = –3
You can also use parentheses to emphasize the existing sequence of
evaluation for ease in reading the expression. If you’re ever in doubt, go
ahead and use them, even if the parentheses are unnecessary.
Functions
TFORM has a number of built-in functions to assist you in calculations and
the manipulation of strings and numbers. You may also create your own
by using the FUNCTION command. You call a function simply by using
the function reference in an expression; TFORM provides the value of the
function when formatting in your output. A function reference can be the
entire expression. In places where expressions aren’t acceptable, neither
are functions.
A function reference consists of the function name followed by a pair of
parentheses enclosing zero or more expressions, or arguments. Multiple
arguments are separated by commas. Like command names and macro
names, function names can be abbreviated to their first three or more
characters. The function performs its operations with the arguments you
provide, returning a single value that takes the place of the function
reference.
5-16
11387 Tandem Computers Incorporated
Expressions
The value that a function returns is of the type defined for that function.
The expressions you supply must also be of the proper types for that
function. This list defines the abbreviations used in the following function
descriptions.
Note
ABS Function
exp
represents an expression of a nonspecific type.
b-exp
represents a Boolean expression.
i-exp
is an integer expression.
n-exp
is a numeric expression (either an integer or an integer-andfraction combination).
s-exp
is a string expression.
exp
represents an expression of a nonspecific type.
(B)
denotes that the function returns a Boolean value.
(N)
denotes that the function returns a numeric value.
(S)
denotes that the function returns a string value.
Spaces have been added in the following illustration of functions for easier reading. When
you use functions, however, do not add spaces (the exceptions are an expression enclosed
in an indirection escape sequence or a string constant within quotes).
The ABS function returns the absolute (unsigned) value of the numeric
expression.
ABS ( n-exp )
An unsigned value is the same as a positive value.
(N)
11387 Tandem Computers Incorporated
5-17
Expressions
ALIGN Function
The ALIGN function returns a string, s-exp1, aligned in a field.
ALIGN (s-exp1, n-exp [ ,s-exp2 [, s-exp3 ] ] )
n-exp specifies the width, in decipoints (1/72 of an inch) of the field. If
n-exp is less than the number of characters in s-exp1, ALIGN uses the
string width as the field width to avoid truncating the string.
The optional s-exp2, if present, must begin with one of the letters L, C, or
R (any string will do, as long as it begins with one of those letters). It
specifies whether the justified string is to be left-justified, centered, or rightjustified in the field. If you omit this argument, the ALIGN function
automatically right-justifies the string.
The optional s-exp3 specifies a “pad” string used to fill the remainder of
the field. If you omit this argument, the ALIGN function pads the field
with blanks. ALIGN repeats the pad string as many times as is necessary to
fill the field, using as many of the leftmost characters of the pad as it can
when an entire repetition of the pad won’t fit. For example:
\ALIGN ("BAM",1728, "center","thud")\)
returns the field:
thudthudthBAMthudthudthu
(S)
5-18
11387 Tandem Computers Incorporated
Expressions
ARG Function
The ARG function processes macro or user-function arguments; you may
use it only in macros or functions.
ARG ( i-exp [ , b-exp ] )
ARG (n) or ARG (n,#b-exp), where b-exp evaluates to “false,” returns
the value of the nth argument in the list of arguments passed to the macro
by the invocation command.
ARG (n,#b-exp), where b-exp evaluates to “true,” returns the actual
string that was passed as the nth argument. For example, assume the
macro PEEKPAGE contains the following:
The page number is \(ARG(1)\).
This number is stored in \(ARG(1,1)\).
The invocation command \PEEKPAGE SYS_PAGENUMBER tells the
macro to print the actual page number (in this example 3):
The page number is 3.
This number is stored in SYS_PAGENUMBER.
If n is greater than the number of arguments in the list, TFORM issues a
“value out of range” error. If n is zero, the ARG function returns the actual
number of arguments that were passed in the current invocation.
(N,S)
11387 Tandem Computers Incorporated
5-19
Expressions
CHR Function
The CHR function returns a character.
CHR (exp)
If exp is a string, CHR (s-exp ) returns the first characters of that string. If
exp is a number, CHR(n) returns the character that is the nth position in
the ASCII collating sequence. In this case, n must be within the range of 0
through 255. With this function, you can obtain characters you can’t type in
from the keyboard (and the printer can’t print).
The ORD function is the complement of the CHR function; see the
description of the ORD function.
DEFINE Function
(S)
The DEFINE function returns a “true” Boolean value (1) if it finds a
variable in the symbol table with the name specified by var, and that
variable represents a value.
DEFINE ( var )
If the variable is undefined (a variable becomes “defined” when a value is
assigned to it), DEFINE returns a false value (0).
(B)
FIND Function
The FIND function searches the string specified by the first argument,
starting at the character position specified by i-exp, and tries to find the
substring specified by the second argument.
FIND ( s-exp1 , s-exp2 [ ,i-exp ] )
If the FIND function finds the substring, it returns the position number of
the first character after the end of the substring.
For example, FIND(“string”,“in””) returns the number 6, the character
position of the “g” that follows “in.” If it can’t find the substring, FIND
returns zero.
5-20
11387 Tandem Computers Incorporated
Expressions
If you omit i-exp or if it’s less than 1, the FIND function starts its search at
the first character position.
If s-exp2 is an empty string, FIND returns the value of i-exp.
JUSTIFY Function
(N)
The JUSTIFY function returns a string, s-exp1, justified in a field.
JUSTIFY( s-exp1 , n-exp [ , s-exp2 [ , s-exp3 ] ] )
n-exp specifies the width, in characters, of the field. If n-exp is less than
the number of characters in s-exp1, JUSTIFY uses the string width as the
field width to avoid truncating the string.
The optional s-exp2, if present, must begin with one of the letters L, C, or
R (any string will do, as long as it begins with one of those letters). It
specifies whether the justified string is to be left-justified, centered, or rightjustified in the field. If you omit this argument, the JUSTIFY function
automatically right-justifies the string.
The optional s-exp3 specifies a “pad” string used to fill the remainder of
the field. If you omit this argument, the JUSTIFY function pads the field
with blanks. JUSTIFY repeats the pad string as many times as is necessary
to fill the field, using as many of the leftmost characters of the pad as it can
when an entire repetition of the pad won’t fit. For example:
\(JUSTIFY("BAM",24,"center","thud"\)
returns the field
thudthudthBAMthudthudthu
If it’s impossible to center the string exactly in the field, JUSTIFY chooses to
offset it one character to the left, rather than one character to the right.
11387 Tandem Computers Incorporated
5-21
Expressions
When using proportional spacing, you may need to use a “fudge factor” to
get a string to justify properly. The equation
js_fixed = WIDTH(jstring) / WIDTH(" ")
(where JSTRING is the string expression to be justified) gives the number
of character positions the string would occupy if all characters were the
same width as the average-sized space character. Then if you add
(LENGTH(jstring) - js_fixed)
to the length of the field where the string is to be justified, you should get a
better justification.
(S)
LENGTH Function
The LENGTH function returns a value equal to the number of characters in
the value represented by the argument expression (the number of
characters in a string or the number of digits in a numeric value).
LENGTH ( exp )
(N)
LOWER Function
The LOWER function returns the specified string with all of its letters in
lowercase.
LOWER ( s-exp )
(S)
MAX Function
The MAX function returns the value of whichever argument is the greater
of the two.
MAX ( n-exp , n-exp )
(N)
5-22
11387 Tandem Computers Incorporated
Expressions
MIN Function
The MIN function returns the value of whichever argument is the lesser of
the two.
MIN ( n-exp ,n-exp )
(N)
MODULO Function
The MODULO function returns a number that is the remainder of the
division, in integer arithmetic, of the first argument by the second, or
n-exp modulo i-exp.
MODULO ( n-exp ,i-exp )
Computations done by MODULO make use of an implied function that
could be called INT (n), which returns the largest integer that is not greater
than n. Take, for example, the following MODULO equation:
MODULO(A,B) = A - (B * INT(A/B))
Using this equation, MODULO(10,3) evaluates as follows:
MODULO(10,3) = 10-(3*INT(10/3)) = 10-(3*3) = 10-9 =
1
The second argument must be an integer; since it is used as the divisor in a
division operation, it must not be zero. If i-exp is zero, TFORM issues an
error message and does not perform the MODULO function.
(N)
11387 Tandem Computers Incorporated
5-23
Expressions
NUMERIC Function
The NUMERIC function returns a number that it obtains from the first
argument.
NUMERIC ( exp [ ,i-exp ] )
If exp is a numeric expression, NUMERIC simply returns that same value.
If exp is a string, and if it has one or more leading characters that are digits
(“0” through “9”) or “numeric punctuation” (leading + or – sign, decimal
point), NUMERIC converts as much of the string as meets that criterion
into a numeric value (for example, “–127.39K” becomes –127.39). If exp is
a string that has no leading numeric characters, NUMERIC returns zero.
If you include the second argument, which must be an integer, NUMERIC
rounds the returned value to i-exp decimal places. If you specify zero for
i-exp, NUMERIC rounds the result to an integer.
(N)
ORD Function
The ORD function returns a number that represents the position number in
the ASCII collating sequence of the first character of exp, if exp is a string.
ORD ( exp )
For example, ORD(“DECAY”) returns 68, the ASCII ordinal position of the
letter D.
If exp represents a numeric value, ORD returns a value that is equal to exp
modulo 256. For example, ORD(2049) returns the value 1.
The ORD function is the complement of the CHR function:
CHR(ORD(“X”)) returns “X”; ORD(CHR(72)) returns 72.
5-24
11387 Tandem Computers Incorporated
(N)
Expressions
ROMAN Function
The ROMAN function returns a lowercase Roman numeral that is the
equivalent of the integer argument.
ROMAN ( i-exp )
The argument must be greater than zero.
SELECT Function
(S)
The SELECT function returns one of the listed arguments, numeric or
string, as determined by the value of i-exp.
SELECT ( i-exp ,exp [ ,exp ] ... )
If, for example, the value of i-exp is 3, SELECT returns the value of the
third argument (starting with the one after i-exp). Or, perhaps the value
of i-exp is a system variable:
SELECT(sys_dayofweek,"Sun","Mon","Tue","Wed","Thu","Fri","Sat")
Then it returns a string that corresponds to the current day of the week, as
selected by the value of SYS_DAYOFWEEK.
You can mix numeric expressions and string expressions in the argument
list. But the first argument of the SELECT function must be an integer not
less than 1 and not greater than the number of arguments that follow it.
Otherwise, TFORM issues an error message and does not perform the
function.
(N,S)
11387 Tandem Computers Incorporated
5-25
Expressions
STRING Function
The STRING function returns the value of exp in the form of a string; it can
also return a portion of that string, a substring with the beginning and
ending characters specified by the two other arguments.
STRING ( exp [ ,n-exp1 [ ,n-exp2 ] ] )
If you enter a starting-character expression that is less than or equal to zero,
or if you omit it, the STRING function extracts a substring beginning with
the first character of the main string. For example:
STRING(58008918)
returns the string “58008918” .
If you enter an ending-character expression that is greater than the number
of characters in the main string, or if you omit it, TFORM assumes you
mean the substring is to end with the last character of the main string. For
example:
STRING("HOUSEWORK",6,40)
returns the string “WORK” .
5-26
11387 Tandem Computers Incorporated
Expressions
If you enter the same value for the starting and ending character
specifications, it means you want a substring of just one character. For
example:
STRING(sys_chars,4,4)
returns the string “#” (the fourth character in the string making up the
SYS_CHARS variable). If you enter beginning-character and endingcharacter specifications that designate positions within the main string, it
means you want a substring that starts and ends with the characters in
those positions. For example:
STRING(58008918,2,6)
returns the string “80089” .
You can use noninteger values for the starting or ending character
specifications, but TFORM truncates them to integers. The STRING
function sees 2.7 as meaning the second character.
TRANSLATE Function
The TRANSLATE function returns a string.
TRANSLATE ( s-exp1 ,s-exp2 ,s-exp3 )
The string returned is translated from the first argument which is the
“source” string. The second argument is a “key” string, and the third is a
“replacement” string.
The TRANSLATE function starts with the first character in the key string
and scans the source string, looking for that character. In the output string,
the TRANSLATE function changes all occurrences of that character to the
first character of the replacement string. It then replaces all occurrences in
the source string of the second key character with the second replacement
character, and so on until it reaches the end of the key string.
11387 Tandem Computers Incorporated
5-27
Expressions
The TRANSLATE function returns unchanged in the output string all
characters from the source string that have no corresponding character in
the key string.
The TRANSLATE function deletes from the output string all source
characters that appear in the key string, but for which there is no
corresponding character in the replacement string. For example:
\TRANSLATE("James","am","on")
returns the string “Jones” .
You can use metacharacters (such as \> or \#) except the comment
metacharacter (\!) in either the key string or the replacement string.
TFORM treats them as single characters. Remember that if you want to use
a character that is the same as the trigger character, you must double it to
make TFORM treat it as a text character.
(S)
UPPER Function
The UPPER function returns the specified string with all of its letters in
uppercase.
UPPER ( s-exp )
(S)
WIDTH Function
The WIDTH function examines the string argument and, taking into
account the current horizontal pitch setting, returns a number that is equal
to the width of that string in decipoints.
WIDTH ( s-exp )
(N)
5-28
11387 Tandem Computers Incorporated
6 System Parameters
This section describes parameters set by the GUARDIAN 90 command
interpreter PARAM command that affect TFORM. The PARAM command
has the form:
PARAM [ parameter-name
parameter-value
[ , ... ] ]
The parameters you set before running TFORM determine several
environmental effects on TFORM and the spooler, such as the number of
copies to print, whether a document is to be printed immediately or held in
the spooler, and what report name is sent to the spooler.
In all of the descriptions that follow, Boolean represents a single digit, 1 or 0,
that defines a Boolean value: 1 is true, 0 is false. The terms int, char, and
string represent, respectively, an integer, a single character, and a string of
characters. Quotation marks around a string are optional, but if you omit
them the string cannot contain any commas or any leading or trailing
blanks. If you use quotes, all characters present, including commas and
blanks, become part of the parameter.
11387 Tandem Computers Incorporated
6-1
System Parameters
COPIES
This parameter specifies how many copies you want printed.
What to Enter
PARAM COPIES int
How to Use COPIES
TFORM tells the spooler how many copies to print when it calls
SPOOLSTART. Level 3 spooling (see the description of the SPOOLOUT
parameter in this section) must be in operation for this parameter to have
any effect.
If you don’t enter this parameter, TFORM prints one copy.
6-2
11387 Tandem Computers Incorporated
System Parameters
DEVICE^TYPE
This parameter specifies the device class to which TFORM output is sent.
What to Enter
PARAM DEVICE^TYPE int
int
must be 0, 1, 2, or 3.
How to Use DEVICE^TYPE
This parameter gives you a way to tell TFORM to output the controlling
codes for the letter-quality printer, regardless of where the output is
actually being sent. For example, if you want to send your document to a
Tandem 5530 letter-quality printer, then you enter:
PARAM DEVICE ^^^TYPE 1
If you don’t enter this parameter, TFORM determines the printer class from
the output location specified or implied in the RUN command that initiates
TFORM. If this class does not correspond to a printer, TFORM assumes a
device type of 0.
TFORM recognizes these four classes of devices:
3 = Any printer that recognizes PCL Level III
2 = Any printer that recognizes PCL Level II
1 = Tandem 5530 letter-quality printer
0 = All other Tandem printers
11387 Tandem Computers Incorporated
6-3
System Parameters
For DEVICE^TYPE 2 or 3, Tandem has adopted a standard set of printer
features (and corresponding commands) for use in its printers. The set of
features used is PCL (Printer Control Language) command language
developed by Hewlett-Packard Company. Tandem is a licensee of
Hewlett-Packard Company. PCL command language defines a standard
for printer features and feature access by software applications. It provides
the highest level of communication between the system and the printer.
PCL command language is designed to be independent of the Tandem
system, device drivers, the I/O interface, and network communications. Its
purpose is to bring together all printers under a common and consistent
control structure that provides feature compatibility from printer to printer.
This protects the investment in applications and driver software.
DEVICE^TYPE 2 allows you to specify bold and underlining. Printers
implementing this feature set are generally multiple-user hard-copy
devices that have a wide range of performance. This level is used in the
EDP environment or for transaction processing and is referred to as Level II
in the PCL language.
DEVICE^TYPE 3 allows you to control fonts and draw straight lines for
boxes, and also contains the same features as DEVICE^TYPE 2. This level
is tailored toward the needs of the office: high-quality output with
additional data-formatting capabilities. This level is referred to as Level III
in the PCL language.
Refer to the Laser-LX Technical Reference Manual for more information about
the PCL language and its different levels.
6-4
11387 Tandem Computers Incorporated
System Parameters
FORM
This parameter specifies a spooler form name if you wish to have one other
than the default (all blanks).
What to Enter
PARAM FORM string
string
can contain from zero to 16 characters.
How to Use FORM
TFORM sends the specified form name to the spooler when it calls
SPOOLSTART.
Level 3 spooling (see the SPOOLOUT parameter) must be in operation for
this parameter to have any effect.
11387 Tandem Computers Incorporated
6-5
System Parameters
HOLD
This parameter allows you to specify the state of the document in the
spooler.
What to Enter
PARAM HOLD boolean
boolean
can assume one of two values, corresponding to TRUE or FALSE.
How to Use HOLD
By specifying 0 or 1, you can tell TFORM whether you want documents to
be formatted and printed (0) or formatted only (1). TFORM sends this
value to the spooler when it calls SPOOLSTART. It tells the spooler
whether to make the status of the spool job READY (0) or HOLD (1).
Level 3 spooling (see the SPOOLOUT parameter) must be in operation for
this parameter to have any effect.
If you don’t enter this parameter, TFORM prints all documents
immediately. If you want to put a document on hold, you must use
PERUSE or SPOOLCOM to do so.
6-6
11387 Tandem Computers Incorporated
System Parameters
PRINTER^TYPE
This parameter specifies the device class for the type of formatting to be
sent to the printer.
What to Enter
PARAM PRINTER^TYPE int
int
must be 0 or 1.
How to Use PRINTER^TYPE
TFORM recognizes two classes of devices:
1 = Tandem 5530 letter-quality printer
0 = All other Tandem printers
If PRINTER^TYPE is 0, lines can never be wider than the specified
margins. If PRINTER^TYPE is set to 1, TFORM assumes the printer is
capable of compressing lines to fit within the margins, and therefore uses a
different line-break rule to take advantage of that flexibility.
PARAM PRINTER^TYPE 1 allows you to use a high-speed printer to
produce a version of a document quickly, but with the line breaks and page
breaks it would have if it were sent to a letter-quality printer. (The printer
must be one with paper wide enough to accommodate the overlength lines
that result. Note also that such a printer can’t cope with superscripts and
subscripts, so the results may not be exactly what you expect.)
If you don’t enter this parameter, TFORM obtains the printer class from the
value of the DEVICE^TYPE parameter, whether explicit or implicit.
11387 Tandem Computers Incorporated
6-7
System Parameters
REPORT^NAME
This parameter determines what is sent as a report name to the spooler.
What to Enter
PARAM REPORT^NAME boolean
boolean
can assume one of two values, corresponding to TRUE or FALSE.
How to Use REPORT^NAME
If REPORT^NAME is false (0), TFORM sends to the spooler the user-name
portion of the user ID of the process that started TFORM.
If REPORT^NAME is true (1), TFORM sends the subvolume-name and file
name of the input file to the spooler.
If you don’t enter this parameter, TFORM assumes REPORT^NAME is
false.
6-8
11387 Tandem Computers Incorporated
System Parameters
SPOOLOUT
This parameter determines whether level 3 spooling is to be done on
output. The various levels of spooling are described in the Spooler
Programmer's Guide.
What to Enter
PARAM SPOOLOUT boolean
boolean
can assume one of two values, corresponding to TRUE or FALSE.
How to Use SPOOLOUT
Setting SPOOLOUT to true (1) specifies that level 3 spooling is to be done.
For this to take place, the output location must be a process (usually the
spooler) and the call to SPOOLSTART must be successful.
If you don’t enter this parameter, level 3 spooling is automatically in effect.
11387 Tandem Computers Incorporated
6-9
Appendix
A Syntax Summary
This appendix contains a summary of the syntax of TFORM commands,
expressions, and escape sequences for quick reference. Although the “&”
trigger character is shown in these illustrations, you can use any trigger
that you define instead.
Commands
\ADDRESS
\ASSIGN variable-name exp
\[ BREAK [ PARAGRAPHS ] ]
\CENTER
int
ON
OFF
BLANK
COMMAND
\CHANGES
\
int
ON
OFF
BLANK
COMMAND








 COMMENT 
 !
 [ text ]


\CONTENTS [ title ]
11387 Tandem Computers Incorporated
A-1
Syntax Summary
 TOP


BOTTOM

  SIDES [LEFT
RIGHT]




BOX CORNERS TOP LEFT
 ["char"] 
RIGHT



 
BOTTOM LEFT 

 RIGHT
 



\DEFINE

 CHANGES [ "char" ]

 CONTENTS [ "string" ]

 OVERSTRIKE [ "char" ]

 TITLE  FIELD [ "char" ] 
 PAGENUMBER [ "char" ]



 TRIGGER [ "char" ]
\ELSE
\ENDFUNCTION [ function-name ]
\ENDIF
\END LIST [ list-name ]
\ENDLOOP
A-2
11387 Tandem Computers Incorporated
Syntax Summary
\ENDMACRO [ macro-name ]
SYSTEM \system-name


\ENV
VOLUME $[volume-name

$volume-name.] subvol-name






˚
\ERROR string
\EXIT
\EXITLOOP
\EXITMACRO
 
OPEN file-name READ
WRITE
APPEND

 
[
PURGE ]

 

\FILE 
READ { filename | * } var [ ‚var ] ... 
 WRITE { filename | * } exp [ ‚exp ] ...

 CLOSE filename
˚
˚

 FIRST





\FOOTER [ NOW ] [ int ]
[ ALL ] ODD
[ title ]

 EVEN






11387 Tandem Computers Incorporated
A-3
Syntax Summary
\FUNCTION function-name
 BEGIN [LOCAL var [‚ var]... ] 
 APPEND

 DELETE

. . .
commands
. . .
\RETURN expression
. . .
commands
. . .
\ENDFUNCTION [ function-name ]
\HEADER
\HELP
A-4

 FIRST


 [ NOW ] [ int ]  [ ALL ] ODD  [ title ]

 EVEN






ALL [ COMMANDS ]
command-name

ESCAPES
OPERATORS

SYNTAX [ CONVENTIONS ]
DEFINE [ CHARS ]
SYSTEM
SYSTEM FUNCTIONS
PRINT [ FLAGS ] 
SYSTEM
SYSTEM SET [ FLAGS ]
SYSTEM VARIABLES

11387 Tandem Computers Incorporated
Syntax Summary
\IF exp
. . .
commands and/or text
. . .
\[ ORIF exp ]
. . .
commands and/or text
. . .
\[ ELSE ]
. . .
commands and/or text
. . .
\ENDIF
 LEFT  
 RIGHT 
ON

int
[+|-] num [units]
BLANK


COMMAND BOTH  




\INDENT 



 OFF LEFT


RIGHT
 BOTH 

\ITEM [ exp ] [ STYLE exp ]
 ON
 OFF
 BLANK
COMMAND
int
\KEEP



11387 Tandem Computers Incorporated
A-5
Syntax Summary
\LETTER body-file list-file
[date [top-space [addr-lines] ]]
0 title [int]
int string
FORMAT int BEFORE int AFTER int PAGE ODD
EVEN
STYLE int
\LEVEL
CONTENTS
LEFT
CENTER
RIGHT
BOLD
NUMBER
...
UNDERLINE
UPSHIFT
ON | OFF
int
INDENT int1 int2 ... int11
LINES
int1 int2 ... int11
PAGESTRING string
REFERENCE var1 [ var2 ]


LOWER
ALPHABETIC UPPER


[ BULLET ]
\BEGIN LIST [list-name]NUMERIC
 [keywords]
ROMAN
UPPER
 STYLE[expLOWER] 


\ITEM [ exp ] [ STYLE exp ]
\END LIST [ list-name ]
A-6
11387 Tandem Computers Incorporated
Syntax Summary
\LOOP [ exp ]
. . .
commands and/or text
. . .
\[ NEXTLOOP ]
. . .
commands and/or text
. . .
\[ EXITLOOP ]
. . .
commands and/or text
. . .
\ENDLOOP
\MACRO macro-name
 BEGIN [ LOCAL var [‚ var] ... ] 
 APPEND

 DELETE

. . .
commands and/or text
. . .
[ \EXITMACRO | \RETURN ]
. . .
commands and/or text
. . .
\ENDMACRO [ macro-name ]
\macro-name [ exp1 [ [ exp2 ] ... [ expn ] ] ]
\NEW [ ODD | EVEN ]
11387 Tandem Computers Incorporated
A-7
Syntax Summary
\NEXTLOOP
\ORIF exp
 ON

\PAGE  OFF

 [ + | - ] int [ .int ] 
FIRST
[ALL] ODD
EVEN
BIN
[ int ]
DRAFT [ON | OFF]
ERRORS [ON | OFF]
MANUALLY [ON | OFF]
\PRINT
OFFSET
FIRST
[ALL] ODD
EVEN
PAGES
int
int | int
CHANGES
WARNINGS [ON | OFF]
A-8
11387 Tandem Computers Incorporated
[[+|—] num [units]]
, ...
Syntax Summary
BOX
ON [ ARROW ]
OFF
CHANGES { ON | OFF }
DOWNSHIFT { ON | OFF }
ERRORS { ON | OFF }
HYPHENS
ON
int
ENGLISH
ANYWHERE
OFF
JOIN { ON | OFF }
\SET
JUSTIFY { ON | OFF }
PITCH
int
PROPORTIONAL
HORIZONTAL
VERTICAL int
SEQUENCING { ON | OFF }
SPACING [ num ] [ FIXED ]
TABS { ON | OFF } [ int [ , int ] ...]
UPSHIFT { ON | OFF }
WARNINGS { ON | OFF }
 [ PROFILE ]  RESTORE
 SKIP
  RETAIN 
USE 


 
\SOURCE filename

 

VERBATIM

11387 Tandem Computers Incorporated
A-9
Syntax Summary
\SPACE [ num [ units ] [ PAGE ] ]
CHANGES ALTERNATE
FONT num "string"
FORM
LENGTH
WIDTH
num [ units ]
GAP
HEADER
FOOTER
[[+|—]num [units]]
TOP
BOTTOM
LEFT
RIGHT
\STYLE
MARGIN
HEADER
LEFT
RIGHT
FOOTER
LEFT
RIGHT
PARAGRAPHS
BOTTOM [int]
TOP [int]
GAP
INDENT
SENTENCES
int
VERBATIM
\TI [ + | - ] num [ units ]
A-10
11387 Tandem Computers Incorporated
[[+|—]num [units]]
[+|—]num [units]
VERBATIM
Syntax Summary
\TIME
\TITLE title


\TODAY


 SHORT ["char"]   USA  [ "m1‚...‚m12" ]
 LONG
   WORLD


 

CHANGE [ exp1 exp2 exp3˚]


 int 
\VERBATIM  BLANK
11387 Tandem Computers Incorporated
A-11
Syntax Summary
Table A-1.
A-12
Escape Sequences
Metacharacters
Description
\!
\\\
\#
\.
\<
\>
\&
\%
\=
Comment line
Discretionary hyphen
Literal trigger character
Required blank
Required carriage return (break)
Symbolic backspace
Symbolic horizontal tab
Symbolic word concatenator
Hanging indent (used by TFORMCVT when
converting T-TEXT to TFORM)
Required microspace
Rendition Controls
Description
\BOLD text
\FONT text
\DOWN text
\OVERSTRIKE text
\SHADOW text
\UNDERLINE text
\UP text
\[VALUE](exp\)
Print text in boldface type
Change the font of the text
Print text as a subscript
Overprint text with overstrike character
Print text in shadow type
Underline all of text
Print text as a superscript
Replace this sequence with string value of exp
11387 Tandem Computers Incorporated
Syntax Summary
Expressions
In this syntax, "::=" means "is defined as", "character" is any ASCII
character, and "digit" is any ASCII numeric character.
expression
::=
conjunction [ // expression ]
conjunction
::=
comparison [ && conjunction ]
comparison
::=
sum
><= 
>=<= sum
<>
 +

 - sum
  &

 

sum
::=
term
term
::=
factor
::=
 +
 - primary
  ! 
  
factor
11387 Tandem Computers Incorporated
/ term
*
 

A-13
Syntax Summary
A-14
primary
::=
constant | variable | function | (exp)
constant
::=
string | number
variable
::=
name
function
::=
name ( expression [ , expression ] ... )
 digit 
 letter
 

name
::=
letter
string
::=
" [ character [ character ] ... ] "
number
::=
integer [ . integer ]
integer
::=
digit [ digit ] ...
11387 Tandem Computers Incorporated
...
Syntax Summary
Functions
The following are brief descriptions of the TFORM-supplied functions you
can use in expressions. In this syntax, b-exp represents a Boolean
expression, i-exp is an integer expression, n-exp is a numeric (either an
integer or an integer-and-fraction combination) expression, and s-exp is a
string expression; exp is an expression of any type.
ABS ( n-ex )
returns the absolute value of nex.
ARG ( i-exp [ ,b-exp ] )
returns the specified argument value.
CHR ( exp )
returns an ASCII character.
DEFINE ( var )
returns "true" Boolean value (the number 1) if variable exists.
FIND ( s-exp1 ,s-exp2 [ ,i-exp ] )
returns the location of s-exp2 within s-exp1.
JUSTIFY ( s-exp ,n-exp [ ,s-exp [ ,s-exp ] ] )
returns a string justified in a field.
LENGTH ( exp )
returns the number of characters in exp.
LOWER ( s-exp )
returns the string with all letters in lowercase.
MAX ( n-exp ,n-exp )
returns the larger of two values.
MIN ( n-exp ,n-exp )
returns the smaller of two values.
MODULO ( n-exp ,i-exp )
returns the remainder of n-exp/i-exp.
NUMERIC ( exp [ ,i-exp ] )
returns the numeric value of exp, rounded to i-exp digits.
11387 Tandem Computers Incorporated
A-15
Syntax Summary
ORD ( exp )
returns the ASCII code for first character of s-exp, or
n-exp modulo 256.
ROMAN ( i-exp )
returns a lowercase Roman numeral equal to i-exp.
SELECT ( i-exp ,exp [ ,exp ] ... )
returns the i-exp(th) expression in the list.
STRING ( exp [ ,n-exp1 [ ,n-exp2 ] ] )
returns the string value of exp, or substring defined by
other arguments.
TRANSLATE ( s-exp1 ,s-exp2 ,s-exp3 )
returns the encrypted form of s-exp1, using other strings as keys.
UPPER ( s-exp )
returns a string with all letters in uppercase.
WIDTH ( s-exp )
returns the width of string in decipoints.
A-16
11387 Tandem Computers Incorporated
Syntax Summary
System Variables
The following are the variables that TFORM creates and maintains. You
can use them, as well as variables you define, in expressions. Do not use
the prefix "SYS_" in any of your variable names.
In the following list, (N) indicates a numeric variable and (S) a string
variable.
SYS_BOTTOMMARGIN
– Number of decipoints between last
footer and bottom of form.
(N)
SYS_CHARS
– String of characters that can be changed
by DEFINE command. Individual
characters are shown in Table A-1.
Table A-2.
String Characters Changed by DEFINE
Position Significance
1
2
3
4
5
6
7
8
9
10
11
12
13
Command trigger
Change mark
Title field separator
Title page number
Box top
Box left side
Box right side
Box bottom
Box top left corner
Box top right corner
Box bottom left corner
Box bottom right corner
Overstrike character
Changed by
DEFINE TRIGGER
DEFINE CHANGES
DEFINE TITLE FIELD
DEFINE TITLE PAGENUMBER
DEFINE BOX TOP
DEFINE BOX SIDE LEFT
DEFINE BOX SIDE RIGHT
DEFINE BOX BOTTOM
DEFINE BOX CORNER TOP LEFT
DEFINE BOX CORNER TOP RIGHT
DEFINE BOX CORNER BOTTOM LEFT
DEFINE BOX CORNER BOTTOM RIGHT
DEFINE OVERSTRIKE
Default
\
|
|
#
–
|
|
–
–
–
–
–
–
You can access any character by use of
STRING function. Defaults are shown
above in Table A-1.
(S)
11387 Tandem Computers Incorporated
A-17
Syntax Summary
SYS_DATE
– String form of date maintained by
TODAY macro. Current form depends
on how macro was last invoked; default
form is "mm/dd/yy".
(S)
SYS_DAY
– Integer, 1..31, representing current day
of month.
(N)
SYS_DAYOFWEEK
– Integer, 1..7, representing current day of
week.
(N)
SYS_DEVICETYPE
– Integer, 0 or 1, representing type of
output device in use.
(N)
SYS_FILECODE
– GUARDIAN 90 file code of current
input file.
(N)
SYS_FILEDATE
– Last modification date (mm/dd/yyyy)
of current input file.
(S)
SYS_FILEERROR
– GUARDIAN 90 file system error code
for most recent FILE command (0 = no
error).
(N)
SYS_FILENAME
– GUARDIAN 90 file name (external
form) of current input file.
(S)
– Last modification time (hh:mm:ss,
24-hour format) of current input
file.
(S)
SYS_FILETIME
SYS_FORMLENGTH
SYS_FORMWIDTH
A-18
– Length, in decipoints, of form
in use.
(N)
– Width, in decipoints, of form
in use.
(N)
SYS_HOURS
– Integer, 0..23, representing hours
portion of time at which the formatting
began.
(N)
SYS_INPUTLINENUM
– Line number of current input line.
11387 Tandem Computers Incorporated
(N)
Syntax Summary
SYS_LDESC
– Descriptive label obtained from ITEM
command.
(S)
SYS_LEFTINDENT
– Current indentation, in decipoints, from
left margin.
(N)
SYS_LEFTMARGIN
– Current left margin setting, in
decipoints.
(N)
SYS_LEVELn_TITLE
– Title supplied by current LEVELn
(0..10) macro (this entry refers to eleven
different variables).
(S)
SYS_LINEHEIGHT
– Current height of a text line in
decipoints; includes vertical pitch and
line spacing factors.
(N)
SYS_LINEWIDTH
– Current width of a text line in
decipoints.
(N)
SYS_LNUM
– Sequential label number for descriptive
list.
(N)
SYS_MACRONAME
– Name of TFORM macro, if any, being
executed.
(S)
SYS_MINUTES
– Integer, 1..59, representing minutes
portion of time at which formatting
began.
(N)
SYS_MONTH
– Integer, 1..12, representing month in
which formatting is being done.
(N)
SYS_PAGENUMBER
– Current page number.
SYS_PARAGRAPHBOTTOM
– Current setting, in lines, for the number
of lines kept together at the bottom of a
paragraph.
(N)
SYS_PARAGRAPHGAP
– Current setting, in decipoints, of space
between paragraphs.
(N)
11387 Tandem Computers Incorporated
(N)
A-19
Syntax Summary
SYS_PARAGRAPHINDENT
– Current indentation setting, in
decipoints, for first line of each
paragraph.
(N)
SYS_PARAGRAPHTOP
– Current setting, in lines, for the number
of lines kept together at the top of a
paragraph.
(N)
SYS_PRINTFLAGS
– String of characters that represent the
flags set by the PRINT command.
Individual characters are shown in
Table A-2.
Table A-3.
Flags And the PRINT Comamnd
Position Significance
1
2
3
4
5
Use draft mode formatting
Print error pages
Print pages manually
Print only changed pages
Print warning pages
Changed by
PRINT DRAFT
PRINT ERRORS
PRINT MANUALLY ON
PRINT PAGES CHANGES
PRINT WARNINGS
Default
0
1
0
0
0
You can access any character by use of
STRING function. Defaults are shown
in Table A-2.
(S)
A-20
SYS_RIGHTINDENT
– Current indentation, in decipoints, from
right margin.
(N)
SYS_RIGHTMARGIN
– Current right margin setting in
decipoints.
(N)
SYS_SECONDS
– Integer, 0..59, that represents seconds
portion of time at which formatting
began.
(N)
SYS_SECTION_NUM
– Section number in current LEVEL 0
macro (can be letter instead of
number).
(S)
11387 Tandem Computers Incorporated
Syntax Summary
SYS_SETFLAGS
Table A-4.
Position
1
2
3
4
5
6
7
8
9
10
11
12
13
14
– String of characters representing flags
that can be changed by SET command.
Individual characters are shown in
Table A-3.
Flags Changed by SET Command
Significance
Changed by
Box construction
Printing arrow in box
Change mark printing
Text downshifting
Error reporting
Word hyphenation
Hyphenation by syllables
Text joining
Text justification
Text line numbering
Fixed interline spacing
Existence of tab stops
Text upshifting
Warning reporting
SET BOX
SET BOX ON ARROW
SET CHANGES (or CHANGES)
SET DOWNSHIFT
SET ERRORS
SET HYPHENS
SET HYPHENS ON n ENGLISH
SET JOIN
SET JUSTIFY
SET SEQUENCING
SET SPACING n FIXED
SET TABS
SET UPSHIFT
SET WARNINGS
Default
0
0
0
0
1
0
1
0
0
0
0
0
0
0
You can access any character by use of
the STRING function. Defaults are
shown in Table A-3.
(S)
SYS_STACKFLAGS
11387 Tandem Computers Incorporated
– String of characters representing flags
that indicate whether TFORM is
processing lines within the scope of
various commands. Individual
characters are shown in Table A-4.
A-21
Syntax Summary
Table A-5.
String of Characters Representing Flags
Position
1
2
3
4
5
Command
CENTER
CHANGES
INDENT LEFT | BOTH
INDENT RIGHT | BOTH
KEEP
You can access any character by use of
the STRING function.
(S)
A-22
SYS_SYSTEM
– External name of current system
SYS_TABS
– List of column numbers, separated by
commas, of tabs currently set.
(S)
SYS_TEXTAREALENGTH
– Length, in decipoints, of text region
(area left after accounting for headers,
footers, and gaps).
(N)
SYS_TEXTAREAUNUSED
– Length, in decipoints, of text area not
already occupied by text lines.
(N)
SYS_TFORMVERSION
– Current version of TFORM running on
your system.
(S)
SYS_TOPMARGIN
– Number of decipoints between top of
form and first header.
(N)
SYS_VOLUME
– External name of current volume and
subvolume.
(S)
SYS_YEAR
– Current year, a 4-digit integer.
11387 Tandem Computers Incorporated
(S)
(N)
Appendix
B TFORM Messages
Error Messages
If PRINT ERRORS ON is in effect (it is by default), TFORM prints an error
message on an extra page following the one on which an error occurs. It
also includes the number of the line in the source file that contains the
error, and the line itself. An asterisk below the line marks the location of
the error within the line.
The following are descriptions of the error messages that may appear.
ARG HAS UNDEFINED VALUE
A macro used the ARG function to access the value of an argument passed
to it by the macro invocation command, but no value had been assigned to
that argument. Use the form ARG(n_,1) to access the text of the argument.
ARG FUNCTION MAY APPEAR ONLY IN MACROS OR FUNCTIONS
An ARG function appeared somewhere other than inside a macro or a
function.
ARITHMETIC OVERFLOW
An operation produced a numeric value that is less than –2147483.647 or
greater than +2147483.647.
11387 Tandem Computers Incorporated
B-1
TFORM Messages
BAD MACRO/FUNCTION NAME
A macro or function name must conform to the same rules as a variable
name. The macro name in a MACRO BEGIN or MACRO APPEND
command, or a function name in a FUNCTION BEGIN or FUNCTION
APPEND, violates one or more of those rules. This message also results if
an ENDMACRO or ENDFUNCTION command contains a name that isn’t
the same as the name in the corresponding macro- or function-beginning
command.
BAD SYSTEM NAME
A system name must begin with a backslash followed by a letter, may
contain only letters and numerals in the rest of the name, and may not
exceed a total of eight characters. An identifier that violates one or more of
these rules appeared in a place where a system name was expected.
BAD VALUE FOR CURRENT FORM LENGTH, MARGINS, GAPS, HEADERS,AND FOOTERS
Although individual STYLE vertical-measurement specifications may be
valid, collectively they indicate an impossible condition (for example, the
sum of the top and bottom margins, headers, footers, and gaps exceeds the
total form length). The first STYLE command that causes this condition
triggers this error message.
BAD VALUE FOR CURRENT FORM WIDTH, MARGINS, OFFSET, AND INDENTS
The combined STYLE horizontal-measurement specifications indicate a
condition that can’t exist (left margin being to the right of the right margin,
for example). The first STYLE command that causes this condition triggers
this error message.
B-2
11387 Tandem Computers Incorporated
TFORM Messages
BAD VOLUME NAME
A disc volume name must begin with a dollar sign followed by a letter,
may contain only letters and numerals in the rest of the name, and may not
exceed a total of eight characters. An identifier that violates one or more of
these rules appeared in a place where a volume name was expected.
COMMAND ERROR
A trigger character in the first character position of an input line was
followed by an identifier that doesn’t resemble any known TFORM
command or macro name.
COMMAND OUT OF PLACE
A command that TFORM expects to see in a specific place has appeared
elsewhere; for example, an ELSE command outside of an IF construct or an
EXITMACRO not in a macro. This error can also be caused by an earlier
error in the command (IF, MACRO BEGIN, and so on) that should have
created the context in which the supposedly erroneous command was
expected to appear.
COULD NOT OPEN INPUT FILE, ERROR CODE file-error-number
A SOURCE command failed because it couldn’t open the chosen file. The
accompanying GUARDIAN 90 file system error number displays the cause.
DUPLICATE MACRO/FUNCTION - CONFLICTING NAME: macro/function-name
A MACRO macro-name BEGIN or a FUNCTION function-name BEGIN
command contained the name of an existing macro, function, or the name
of a TFORM command.
11387 Tandem Computers Incorporated
B-3
TFORM Messages
"ENDIF" COMMAND MISSING
An IF construct must end with an ENDIF command; TFORM found more
IF commands in the input file than ENDIF commands.
"ENDFUNCTION" COMMAND MISSING
A FUNCTION definition must end with an ENDFUNCTION command;
TFORM found more FUNCTION BEGIN and/or FUNCTION APPEND
commands than ENDFUNCTION commands.
"ENDLOOP" COMMAND MISSING
A LOOP construct must end with an ENDLOOP command; TFORM found
more LOOP commands than ENDLOOP commands.
"ENDMACRO" COMMAND MISSING
A MACRO definition must end with an ENDMACRO command; TFORM
found more MACRO BEGIN and/or MACRO APPEND commands than
ENDMACRO commands.
FILE ALREADY EXISTS
The edit file name you used to name the outfile in your TFORM RUN
command already exists. You must either use a unique name for the outfile
name or purge your existing file so the outfile name is unique.
B-4
11387 Tandem Computers Incorporated
TFORM Messages
FILENAME IS INVALID
A GUARDIAN 90 file name must begin with a letter, must contain only
letters and numerals in the remainder of the name, and must not exceed
eight characters. If the name is expanded to include disc volume and
subvolume, they must have the same form (except that the volume name
must begin with a dollar sign) and all must be separated by periods. A
SOURCE command or a FILE command contains a file name that violates
the naming rules.
FILENAME IS MISSING
A SOURCE command or a FILE command failed to include a file name.
FORM LENGTH, GAPS, TOP AND BOTTOM MARGINS RESET TO DEFAULTS
The vertical alignment values were inconsistent, so TFORM reset them to to
their default values.
FORM WIDTH, LEFT AND RIGHT MARGINS, OFFSETS, AND INDENTSRESET TO DEFAULTS
The horizontal alignment values were inconsistent, so TFORM reset them
to to their default values.
HEADER/FOOTER LINE IS TOO LONG OR FIELDS OVERLAP
The title fields in a HEADER or FOOTER command cumulatively exceed
the space available between the header or footer margins, or one or more
fields exceed the space allowable for their portions of the header or footer.
11387 Tandem Computers Incorporated
B-5
TFORM Messages
I/O ERROR, ERROR CODE file-error-number
A data transfer error occurred during execution of a SOURCE command.
The accompanying GUARDIAN 90 file system error code tells the nature of
the error.
ILLEGAL CHARACTER VALUE
A DEFINE command attempted to assign an illegal character value (for
example, a space for the trigger character) to one of the TFORM control
characters.
ILLEGAL USE OF SYSTEM VARIABLE
You can access system variables, but you’re not allowed to assign values to
them.
ILLEGAL VARIABLE NAME
A variable name must begin with a letter; can contain only letters,
numerals, and underscore characters in the remainder of the name; and
must not exceed 32 characters in length. TFORM found a variable name
that violated one or more of these rules.
INCORRECT NUMBER OF PARAMETERS
Each TFORM function has a specific number of parameters that you must
supply. A function reference contained more, or fewer, parameters than
the function expected.
B-6
11387 Tandem Computers Incorporated
TFORM Messages
INDENT STACK CLEARED; RESET TO MARGINS
Indentation is based on the current margin setting. If a subsequent margin
change renders the existing indentation impossible, TFORM resets all
indentation to zero.
INDIRECTION ESCAPE SEQUENCE WAS NOT ENDED
An escape sequence of the form \VALUE( exp \) or \( exp \) was missing
one or both of its final \) characters.
INPUT FILE IS NOT AN EDIT FILE
A SOURCE command attempted to read a file that is not an EDIT-format
file.
INPUT FILE WAS AN OBJECT FILE
A SOURCE command or a FILE OPEN command attempted to open an
object file for data transfer, an invalid action.
INPUT FILE WAS NOT FOUND
The file name in a SOURCE command doesn’t refer to an existing file.
INSUFFICIENT ROOM TO MARK CHANGES
There must be at least two character spaces to the right of the right margin,
or to the right of the effective right margin for a given line (the result of
print offset, indentation, and so on), whichever is farther to the right, to
allow for printing of the marginal change mark.
11387 Tandem Computers Incorporated
B-7
TFORM Messages
INVALID SCOPE FOR "VERBATIM"
A VERBATIM command can have only two possible scopes: a number of
lines (one line is implied when no scope is stated) or BLANK (until the next
blank source line). ON, OFF, COMMAND, and so on, are unacceptable.
LINE WAS LONGER THAN TEXT AREA WIDTH BY int COLUMNS
When JOIN is off, TFORM can’t break a line that’s too long for the available
area, so it issues this error message.
MACRO/FUNCTION CANNOT BE DELETED WHILE IT IS RUNNING
A MACRO DELETE or a FUNCTION DELETE command appeared within
the macro or function it affects, or within a macro or function it invokes
while it is running.
MORE THAN ONE CHAR FOR CHAR VALUE
You may use a single value for a “char” in any command line that includes
“char” as an option. TFORM returns this error message if it finds more
than one character between the quotation marks.
"NEW" COMMAND NOT ALLOWED WITHIN SCOPE OF "KEEP"
You can’t put a NEW command between KEEP ON and KEEP OFF
commands, within the number of lines specified after a KEEP command, or
before the next blank line or command line, whichever is specified in the
KEEP command.
B-8
11387 Tandem Computers Incorporated
TFORM Messages
NULL STRING FOR CHAR VALUE
You can’t assign null values to control characters with a DEFINE
command.
"OFF" MUST CORRESPOND TO "ON"
If you enter a CENTER OFF, CHANGES OFF, KEEP OFF, or SET BOX OFF
command, you must have previously entered a matching ON command.
Otherwise, TFORM issues this error message.
PAGE NUMBER EXCEEDED LIMIT ON THIS PAGE, RESET TO 1
With its page counter, TFORM automatically keeps track of the number of
pages your file produces as it is processed, regardless of whether the
numbering feature is turned on or off with the PAGE command. When the
page count reaches the page limit of 32500 pages, TFORM resets the page
counter to 1 and starts over to keep the value within bounds.
PAGE NUMBER PARAMETERS RESET TO DEFAULTS
If the page number counter is at too small or too large a number, it is reset
to its defaults.
PARAMETER VALUE ILLEGAL
A parameter value entered in a function reference is unacceptable (for
example, a null string for the ORD function, zero or a negative number for
the ROMAN function, or a character other than L, R, or C for the third
argument of the JUSTIFY function).
11387 Tandem Computers Incorporated
B-9
TFORM Messages
REDUNDANT "ON" COMMAND
A SET BOX ON command follows another SET BOX ON command, with
no SET BOX OFF in between.
REQUIRED PARAMETER IS MISSING
A command lacks a needed parameter, such as PAGE with no page
number, or MACRO with no BEGIN or APPEND modifier, or SET BOX
without specifying ON or OFF.
REQUIRED PARAMETER IS MISSING, ZERO WILL BE ASSUMED
TFORM did not find any value specified for the expression contained in a
RETURN command within a FUNCTION construct. TFORM simply
assumes the value for the expression to be zero so that it can complete the
execution of the FUNCTION construct.
RETURN VALUE WAS NOT SPECIFIED FOR FUNCTION
You forgot to include the RETURN expression statement in your
FUNCTION construct.
STACK OVERFLOW
Whenever a condition occurs that TFORM must remember for later
reference, such as a new indentation, TFORM saves that data in its stack. If
too many “opening” conditions occur without enough “closing”
conditions, the stack overflows.
B-10
11387 Tandem Computers Incorporated
TFORM Messages
STACK TOO FULL FOR FUNCTION INVOCATION
The stack space was minimal when you tried to invoke a function. TFORM
refused to invoke it to prevent a possible abort.
STRING TABLE OVERFLOW
This is a TFORM internal error, which can be caused by repetitive or
recursive macro activities involving string manipulation or assignment.
STRING TABLE TOO FULL FOR MACRO/FUNCTION INVOCATION
The internal table that keeps track of string entities is nearly full and
TFORM has determined that calling a requested macro or function would
cause a string table overflow. The macro or function probably contains an
infinite recursion.
"STYLE" COMMANDS MUST FOLLOW "NEW" COMMAND
Page-oriented STYLE commands (STYLE FORM, STYLE MARGIN, STYLE
GAP, and so on) must appear at the start of a new page. This restriction
doesn’t apply to paragraph- and sentence-oriented STYLE commands.
SYNTAX ERROR
The format of a command, macro, expression, or function violates one or
more of the rules for its construction. See the Appendix A for a summary
of all TFORM syntax.
11387 Tandem Computers Incorporated
B-11
TFORM Messages
TEXT LINES SHOULD NOT APPEAR WITHIN A FUNCTION
A function is not able to produce text lines like a macro can. TFORM
returns this message if it finds any text entered into the FUNCTION
construct; you can only enter certain commands (see the description of
FUNCTION in Section 3).
THE FIELD AND PAGENUMBER CHARS MUST DIFFER
The title field separator character (default “|”) and the page number
character (default “#”) must be different. A DEFINE command has
attempted to make one the same as the other.
THIS COMMAND OR FUNCTION NAME ALREADY EXISTS
TFORM discovered that a FUNCTION command or a MARCO command
referred previously existing function or macro.
THIS COMMAND SHOULD NOT APPEAR WITHIN A FUNCTION
You may only use these commands in a FUNCTION construct: ASSIGN,
ERROR, and COMMENT commands and those in the IF and LOOP
constructs.
THIS FUNCTION IS NOT DEFINED
You tried to invoke a function that does not exist. You might check the
spelling in your command line.
B-12
11387 Tandem Computers Incorporated
TFORM Messages
THIS WORD IS AMBIGUOUS
If the beginning letters of a user-defined macro are the same as those of a
TFORM command or macro, an attempt to invoke either the TFORM entity
or the user macro in abbreviated form (within the number of letters that are
the same) produces this message.
TITLE FIELDS ARE TOO LONG OR OVERLAP
The title fields in a CONTENTS or TITLE command cumulatively exceed
the space available between the margins, or one or more fields exceed the
space allowable for their portions of the line width.
TOKENS AFTER COMMAND IGNORED
Once a command has accessed all the parameters it was expecting, it
ignores anything else on the command line; if there are extra items on the
line, TFORM issues this message. This can occur if there is a space in an
expression: The command considers everything up to the space as the
expression, and everything after that as superfluous.
TOO MANY ERRORS - FORMATTING ABORTED
If TFORM finds more than 200 errors during a run, it abandons the effort
and stops.
TOO MANY ITEMS SPECIFIED
A PRINT PAGES command can list no more than 30 pages or page ranges.
You can set no more than 200 tab stop positions (remember that SET TABS
ON commands are cumulative). This message indicates that you have
exceeded one or the other of these limits.
11387 Tandem Computers Incorporated
B-13
TFORM Messages
TOO MANY "SOURCE" COMMANDS ENCOUNTERED
A file read in by a SOURCE command may contain a SOURCE command
that reads another file, which in turn may source in a third file, and so on;
but not more than 32 input files may be open at one time.
TWO "ELSE" COMMANDS FOR AN "IF" COMMAND
An IF construct can have only one ELSE command.
TYPE MISMATCH
A numeric entity and a string entity can’t be combined by a single operator.
This message may also appear if a function or macro sees a string value
when it expects a numeric value, or vice versa.
UNBALANCED PARENTHESES
In expressions and function references, left and right parentheses must
exist in even numbers and must correspond to one another.
UNDEFINED VARIABLE
An expression contains (or is) a variable that has not yet had a value
assigned to it.
B-14
11387 Tandem Computers Incorporated
TFORM Messages
UNKNOWN ESCAPE CODE ENCOUNTERED
A trigger character, not in the first character position, is followed by
something that doesn’t resemble any known rendition control code (the
key in this case is the left parenthesis that begins a rendition control;
TFORM simply treats as text a trigger followed by unrecognizable
characters with no parenthesis).
UNRECOGNIZED KEYWORD
A command contains an entity that doesn’t resemble any keyword the
command expects to see.
VALUE NOT IN HALF-LINES
The SET SPACING command can adjust interline spacing in whole- or
half-line increments only (1, 1.5, and so on).
VALUE OUT OF RANGE
A value has been supplied to a command or function that is outside the
limits set for that entity. See Appendix C for a summary of maximum and
minimum limits.
WORD WAS LONGER THAN TEXT AREA WIDTH
When joining is on but hyphenation is off, a word can be too long to fit
within the set line width. This is especially likely if words are joined by
mandatory-space (\#) metacharacters to create one huge word.
11387 Tandem Computers Incorporated
B-15
TFORM Messages
YOU ATTEMPTED AN INFINITE SERIES OF SUBSTITUTIONS
A recursive assignment would have continued indefinitely if TFORM
hadn’t caught it and reported it with this message. An example of such is:
\ASSIGN is_a_rose "\\(is_a_rose\\)"
Gertrude says, "Rose \(is_a_rose\)."
YOU HAVE REACHED THE LIMIT FOR NUMBER OF OPEN FILES
Only four auxiliary files can be open at any given time. If you have opened
four files with the FILE READ command, TFORM will return this error
message. The same is true if you have opened four files with the FILE
WRITE command.
YOU MAY NOT SPECIFY "VERBATIM" FOR TTEXT FILES
The VERBATIM keyword cannot be used when a T-TEXT file is sourced in
with the SOURCE command; TFORM needs to be able to read the profile of
the T-TEXT file.
B-16
11387 Tandem Computers Incorporated
TFORM Messages
Warning Messages
Warning messages describe conditions less severe than those named in
error messages. If you want TFORM to print warning messages, you must
use the SET command to set WARNINGS ON. By default, TFORM does
not print them. The TFORM warning messages are as follows:
WARNING - BIN CANNOT BE SELECTED FOR THIS PRINTER
The output device is not a 5530 letter-quality printer and therefore doesn’t
have a cut-sheet feeder with the capability of feeding from either of two
bins.
WARNING - BOLD, SHADOW, OR UNDERSCORE NOT ENDED WITHIN FIELD
A rendition control escape sequence in a title field had no closing \)
characters. TFORM shuts off the boldface, shadow, or underscore printing
at the end of the field, but issues this warning to call attention to the
improperly ended escape sequence.
WARNING - INTERLINE SPACING MUST BE A WHOLE NUMBER FOR THIS PRINTER
Printers other than the 5530 letter-quality printer can’t do half-line spacing.
WARNING - MINIMUM TOP MARGIN OF 1/2 INCH FOR THIS PRINTER
Printers other than the 5530 letter-quality printer have the paper aligned at
a fixed position for perforation skip, which puts the first print line at least
1/2 inch down from the top perforation.
11387 Tandem Computers Incorporated
B-17
TFORM Messages
WARNING - PITCH CANNOT CHANGE FOR THIS PRINTER
Only the 5530 letter-quality printer can change pitch programmatically.
High-speed line printers can’t change (horizontal) pitch at all.
WARNING - SUBSCRIPTS AND SUPERSCRIPTS IGNORED WITH THIS PRINTER
Printers other than the 5530 can’t move the paper forward and backward
from the current line to produce subscripts and superscripts.
WARNING - THE PITCH HAS BEEN ADJUSTED TO MATCH THIS PRINTER
The printer can’t accept the pitch you specified. TFORM adjusts the pitch
to the closest workable pitch to the one you requested. For the Tandem
5530 letter-quality printer, the horizontal pitch must divide evenly into 120
(or be proportional); the vertical pitch must divide evenly into 48.
B-18
11387 Tandem Computers Incorporated
TFORM Messages
Stop Codes
If a drastic error occurs, TFORM calls a STOP process (instead of DEBUG)
and displays a stop message, in the format
TFORM STOP - text [ (FILE SYSTEM ERROR nn) ]
on your home terminal (except in the case of the “could not open home
terminal” error). The following stop messages may appear in the text
portion.
*
*
*
Call to USESEGMENT failed
Could not open home terminal
Could not open output file/process
Could not open the primary input file
Error returned from call to SPOOLJOBNUM
Error returned from call to SPOOLEND
I/O error on write to output device
Internal inconsistency
Invalid PARAM values sent to the formatter
Running under TTEXT; Opening of MOM process failed
Running under TTEXT; Error on write to MOM process
Stack overflow
String table ran out of room
Too many arithmetic overflows
Trap other than arithmetic overflow
For the conditions marked with asterisks, STOP calls FILEINFO and
displays the file system error number following the stop message.
STOP also displays a message on the operator console, in the format
TFORM STOP cpu,pin P E L - text [ (FILE SYSTEM ERROR nn) ]
in which cpu,pin represents the processor and process identification
number of the formatter process; P, E, and L represent the current 6-digit
values of the P-register, E-register, and L-register, respectively; the
remainder of the message is the same as the one shown on the home
terminal.
11387 Tandem Computers Incorporated
B-19
Appendix
C Limits and Defaults
The following list summarizes the minimum, maximum, and default
values for the various form measurements and environment settings used
by TFORM.
The values given for margins are measured from the left edge of the form
or from the top of the form where not otherwise specified. The right
margin is measured from the right edge of the form. The left margin
includes the print offset. The list uses the following abbreviations:
LQP
= Tandem 5530 letter-quality printer
SUM1
= sum of the height of (headers + footers + top margin
+ bottom margin)
SUM2
= sum of the height of (headers + footers + header gap
+ footer gap)
Bin number (LQP only)
Minimum: 1
Maximum: 2
Default:
1
Form length
Minimum: 0.5 inch
Maximum: 45 inches
Default:
11 inches
Form width
Minimum: 1 character
Maximum: 45 inches
Default:
8.5 inches
Footer gaps
Minimum: 0
Maximum: form length - header gap - SUM1 – 0.5 inch
Default:
1 line when one or more footers are defined; 0 when
no footers are defined
11387 Tandem Computers Incorporated
C-1
Limits and Defaults
Header gaps
Minimum: 0
Maximum: form length - footer gap - SUM1 – 0.5 inch
Default:
1 line when one or more headers are defined; 0 when
no headers are defined
Indentation
Left
Minimum: print offset
Maximum: right margin – 0.5 inch
Default:
0 chars
Right
Minimum: form width
Maximum: left margin + 0.5 inch
Default:
0 chars
Line spacing
Minimum: 1 (single-space; any value <1 is the same as 1)
Maximum: 32
Default:
1
Margins
Bottom
Minimum: 0
Maximum: form length—top margin—SUM2 + 0.5 inch
Default:
0.5 inch
Left
Minimum: 0
Maximum: right margin – 0.5 inch
Default:
0.75 inch
C-2
11387 Tandem Computers Incorporated
Limits and Defaults
Right
Minimum: 0
Maximum: left margin + 0.5 inch
Default:
0.75 inch
Top
Minimum: 0 (LQP only)
0.5 inch (all other supported Tandem printers)
Maximum: form length—bottom margin—SUM2 + 0.5 inch
Default:
0.5 inch
Number of headers or footers
Minimum: 1
Maximum: 10
Default:
1
Number of input files
Minimum: 1
Maximum: 32
Default:
1
Page number
Minimum: –32759
Maximum: 32500 (all values <0 are treated alike)
Default:
1
Pitch (LQP only)
Horizontal (choices limited to 10, 12, 15, Proportional)
Minimum: 10 chars/inch
Maximum: 15 chars/inch
Default:
10 chars/inch
Vertical
Minimum: 1 line/inch
Maximum: 48 lines/inch
Default:
6 lines/inch
11387 Tandem Computers Incorporated
C-3
Limits and Defaults
Print offset
Minimum: 0
Maximum: right margin
Default:
0 chars
Sentence spacing
Minimum: 0 spaces at end
Maximum: 2 spaces at end
Default:
2 spaces at end
Tab stop range
Minimum: column 1
Maximum: lesser of form width (in columns) and 255
Default:
no tabs set
C-4
11387 Tandem Computers Incorporated
Appendix
D Comparison of
TGAL and TFORM
For those accustomed to using TGAL, Table D-1 below provides a
comparison (where comparison can be made) of TGAL commands and
TFORM constructs. In most cases, examples are simplistic to show direct
parallels with TGAL and do not attempt to show the full range of
possibilities in TFORM.
Table D-1.
Comparison of TGAL and TFORM
TGAL
TFORM
ALT ON n
(effect of ALT ON on
headers and footers)
PRINT OFFSET EVEN 0
PRINT OFFSET ODD n CHARS
HEADER EVEN "text"
HEADER ODD "||text"
FOOTER EVEN "text"
FOOTER ODD "||text"
ALT ON n ALWAYS
if
No equivalent; TFORM can alternate pages even
no numbers are printed.
ALT OFF
(effect of ALT OFF on
headers and footers)
PRINT OFFSET 0
HEADER "||text"
FOOTER " ||text"
ARROW ON
SET BOX ON ARROW
ARROW OFF
Default for all boxes
BLANK "char"
\# (escape sequence for required blank)
BOTTOMMARGIN n
STYLE MARGIN BOTTOM (n-3) LINES
BOX
...text...
BOX
SET BOX ON
...text...
SET BOX OFF
11387 Tandem Computers Incorporated
D-1
Comparison of TGAL and TFORM
Table D-1.
D-2
Comparison of TGAL and TFORM (continued)
TGAL
TFORM
BOX "char"
DEFINE BOX SIDE "char";
SET BOX ON
BOX "char1" , "char2"
DEFINE BOX SIDES "char1"
DEFINE BOX TOP "char2"
DEFINE BOX BOTTOM "char2"
DEFINE BOX CORNERS "char2"
SET BOX ON
BREAK
BREAK PARAGRAPHS
CENTER n
CENTER n
CENTER ON
CENTER ON
CENTER OFF
CENTER OFF
CENTER B
CENTER BLANK
CENTER trigger
CENTER COMMAND
CHANGES
PRINT PAGES CHANGES
COMMENT text
COMMENT text
\! text
DBL ON
SET SPACING 2
DBL OFF
SET SPACING 1
ERRORS ON
PRINT ERRORS ON
ERRORS OFF
PRINT ERRORS OFF
EXIT
EXIT
FOOT "text"
FOOTER 1 "|text|"
FOOT "text" TODAY
FOOTER 1 "|text\(SYS_DATE\)|"
11387 Tandem Computers Incorporated
Comparison of TGAL and TFORM
Table D-1.
Comparison of TGAL and TFORM (continued)
TGAL
TFORM
HEAD "text"
HEADER 1 "||text"
HEAD "text" TODAY
HEADER 1 "||text\(SYS_DATE\)"
IF toggle-number ON
IF exp
IF toggle-number OFF
IF ! exp
IF (with no option, marking
end of conditionally printed text)
ENDIF
IN filename
SOURCE filename
JOIN ON
SET JOIN ON
JOIN OFF
SET JOIN OFF
JUSTIFY ON
SET JUSTIFY ON
JUSTIFY ON ALWAYS
No equivalent; if JOIN is OFF, TFORM justifies
last line before SET JUSTIFY OFF; if JOIN is
ON, doesn't justify last line
JUSTIFY OFF
SET JUSTIFY OFF
LINENO ON
No equivalent; can be simulated, in part, with
system variable SYS_INPUTLINENUM
NEED n
KEEP n
NEED ON
KEEP ON
NEED OFF
KEEP OFF
NEED B
KEEP BLANK
NEED trigger
KEEP COMMAND
11387 Tandem Computers Incorporated
D-3
Comparison of TGAL and TFORM
Table D-1.
Comparison of TGAL and TFORM (continued)
TGAL
TFORM
NEW
NEW
NEW ODD
NEW ODD
NEW EVEN
NEW EVEN
OUT n
PRINT PAGES n
OUT n1 / n2
PRINT PAGES n1 / n2
OUT "text" n [ / ... ]
No equivalent
OUTLEN n
Line width determined by STYLE and PRINT
OFFSET commands
OV
Accomplished by escape sequences, depending
on requirements:
\<
\BOLD( text \)
\OVERSTRIKE( text \)
\SHADOW( text \)
\UNDERLINE( text \)
D-4
OV n
No equivalent; see preceding description
PAGELEN n
STYLE FORM LENGTH n LINES
PAUSE
PRINT MANUALLY
POFF n
PRINT OFFSET n CHARS
11387 Tandem Computers Incorporated
Comparison of TGAL and TFORM
Table D-1.
Comparison of TGAL and TFORM (continued)
TGAL
TFORM
SECT "text" n
PAGE n
FOOTER 2 "text#"
or FOOTER 2 "||text#"
SECT "text" 0
PAGE OFF
FOOTER 2 "text#"
or FOOTER 2 "||text#"
SECT "text" n CENTER
PAGE n;
FOOTER 2 "|text#|"
SECT "text1" n CENTER "text2"
PAGE n;
FOOTER 2 "|text1#text2|"
SEQ ON SET
SEQUENCING ON
SEQ OFFSET
SEQUENCING OFF
SET toggle-number ON
No equivalent; can be simulated using value
assignments and computations to define exp
in IF commands
SET toggle-number OFF
No equivalent; see preceding description
SPACE
SPACE 1 PAGE
SPACE n
SPACE n PAGE
SUBHEAD "text"
HEADER 2 "||text"
SUBHEAD "text" TODAY
HEADER 2 "||text\(SYS_DATE\)"
11387 Tandem Computers Incorporated
D-5
Comparison of TGAL and TFORM
Table D-1.
Note
D-6
Comparison of TGAL and TFORM (continued)
TGAL
TFORM
TAG "text" n
TAG "text" n
TAG "text" ON
TAG "text" ON
TAG "text" OFF
TAG "text" OFF
TAG "text" B
TAG "text" BLANK
TAG "text" trigger
TAG "text" COMMAND
TEXT ON
SET JOIN ON; SET JUSTIFY ON
TEXT OFF
SET JOIN OFF; SET JUSTIFY OFF
TODAY (all forms)
TODAY (all forms)
TOPMARGIN n
STYLE MARGIN TOP (n-3) LINES
TRANSPARENT
...text...
TRANSPARENT
VERBATIM ON
...text...
VERBATIM OFF
TRIGGER "char"
DEFINE TRIGGER "char"
UPSHIFT ON
SET UPSHIFT ON
UPSHIFT OFF SET
UPSHIFT OFF
VERSION "text"
VERSION "text"
\ (in column 1)
\
$$
KEEP 5
On the TFORM side, TAG, TRANSPARENT, and VERSION are macros created solely to
accommodate TGAL conversions.
11387 Tandem Computers Incorporated
Appendix
E TFORMCVT: Converting
From TGAL to TFORM
TFORMCVT is a utility that provides a simple migration path from existing
TGAL files to TFORM files. TFORMCVT accepts a file containing TGAL
commands and creates an edit file containing the TFORM commands that
provide similar formatting. This appendix gives an overview of the
operation and functioning of TFORMCVT.
To invoke TFORMCVT, you use an implied RUN command at your
command interpreter:
TFORMCVT / [ IN infile ] [ , OUT outfile ] / TGAL
infile
is an edit file containing valid TGAL commands, or a terminal from
which text and valid TGAL commands will be entered. If you omit the
IN parameter, TFORMCVT accepts input from your home terminal.
outfile
is an edit file to which TFORMCVT will send its output. The file must
not now exist; if it does, TFORM sends you a duplication file error
message. If you omit the OUT parameter, TFORMCVT sends its
output to your home terminal.
TGAL
indicates that the input is a TGAL file. The output is automatically a
TFORM file.
You can also include standard RUN command options, such as NOWAIT,
between the slashes. (For more information on using the RUN command
from your command interpreter, see the GUARDIAN 90 Operating Systems
Utilities Reference Manual.
11387 Tandem Computers Incorporated
E-1
TFORMCVT: Converting From TGAL to TFORM
Translation Overview
The input to TFORMCVT is a syntactically valid TGAL file. (The term
“TGAL file” means a file—usually in edit format—containing TGAL
commands, intended to be input to TGAL for formatting and printing; a
“TFORM file” is one containing TFORM commands.) The output file
begins with the translation of TGAL defaults, followed by text lines,
TFORM commands, and (possibly) error messages. Output text lines
generally remain identical to input text lines.
In many ways TGAL and TFORM behave differently from each other.
Although TFORMCVT attempts to overcome these differences, it is not
always possible or desirable to duplicate exactly the effects of TGAL. There
are differences between TGAL and TFORM in dealing with scopes of
commands and in the distinction of which commands cause line breaks
and which don’t. There are also differences in the definition and handling
of paragraphs. Sometimes, there is no direct translation into TFORM for a
TGAL command, and TFORMCVT responds with an error message.
TGAL Defaults
Because TFORM default values are different from TGAL defaults,
TFORMCVT automatically places several TFORM commands in the first
six lines of all of its output files to set certain TFORM entities to the same
values as the TGAL defaults. These commands are shown below.
\HEADER 1 " "; HEADER 2 " "
\FOOTER 1 " "; PAGE 1;FOOTER 2 "||#"
\STYLE MARGIN RIGHT 15 CHARS; STYLE MARGIN LEFT 0
\ASSIGN TGAL_1 0; ASSIGN TGAL_2 0; ASSIGN TGAL_3 0; ASSIGN TGAL_4 0
\ASSIGN TGAL_5 0; ASSIGN TGAL_6 0; ASSIGN TGAL_7 0; ASSIGN TGAL_8 0
\ASSIGN TGAL_9 0; ASSIGN TGAL_10 0;
The variables TGAL_1 through TGAL_10 represent the “toggles” used in
TGAL IF and SET commands; they are used correspondingly in TFORM IF
and ASSIGN commands.
E-2
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
Differences in
Command Scope
TFORMCVT does not account for the differences in scope algorithms
between TGAL and TFORM; you should therefore be aware of those
differences. TGAL uses the concept of “recency”; that is, the scope of a
given command depends on how recently it was stated. TFORM simply
uses the scope of each command. In the following example, the second
TGAL CENTER command supersedes the first, while the second CENTER
command in TFORM is simply an occurrence within the scope of the first.
TGAL Input
TFORM Input
\center b
line 1
\center 1
line 2
line 3
\center blank
line 1
\center 1
line 2
line 3
line 4
line 4
The TGAL output looks like this:
line 1
line 2
line 3
line 4
But the TFORM output looks like this:
line 1
line 2
line 3
line 4
11387 Tandem Computers Incorporated
E-3
TFORMCVT: Converting From TGAL to TFORM
Commands That Cause
Line Breaks
Paragraph Control
In TGAL, all commands cause a break in line joining whenever they
appear; in TFORM, only the CENTER, DEFINE, FOOTER, HEADER,
KEEP, NEW, SPACE, STYLE, TITLE, and VERBATIM commands cause a
break. Naturally, this is apparent only when JOIN is ON. Instead of
inserting a BREAK command after all other commands when joining is in
effect, to produce a direct translation from TGAL, TFORMCVT follows the
TFORM style and allows joining to continue.
A paragraph is defined as two or more text lines following a break. A
break is defined as a blank line or a command line. The end of a paragraph
is defined by another break.
In TGAL, when JOIN is ON and a paragraph is indented, it remains
indented. TFORM leaves the first line of such a paragraph indented but
joins the rest to the left margin. TFORMCVT attempts to indent
paragraphs as TGAL does by using the TFORM INDENT command with
the following algorithm:
If JOIN is ON and there are at least two indented text lines following a
break, TFORMCVT issues a TFORM INDENT command with a value equal
to the number of blank spaces in the second text line. If the first and
second lines have different indentations, the INDENT command is
followed by the command INDENT 0 to maintain the number of blanks in
the first line. Then TFORMCVT outputs the paragraph, followed by the
command INDENT OFF. Here’s an example:
\INDENT ON 5; INDENT 0
This is a paragraph that started with an indentation of 10
and continued with an indentation of 5. These following lines
will be indented 5 spaces in the TFORM formatted document.
\INDENT OFF
E-4
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
TFORMCVT assumes that input paragraphs are homogeneous. If a
paragraph has a ragged left margin beyond the second line, the indentation
remains that of the second line. It’s your responsibility to add the
appropriate INDENT commands to maintain the ragged edge.
TFORMCVT interprets text in the scope of an OV command as being a
command line. The result is that a paragraph starting with overstruck text
doesn’t have an INDENT command until the second line. The OV
command turns off a paragraph in progress (INDENT OFF).
Unrecognized Errors
TFORMCVT assumes that TGAL commands in the input file are valid and
doesn’t issue warnings for TGAL syntax errors. TFORMCVT may simply
ignore an invalid command in the input file, or the translation process may
terminate unsuccessfully (TFORMCVT may go into DEBUG). Valid TGAL
syntax is that described in the TGAL Reference Manual. If you take
advantage of undocumented features in TGAL, you use TFORMCVT at
your own risk. It’s a good idea to run TGAL on your file before using
TFORMCVT to make sure there are no syntax problems.
11387 Tandem Computers Incorporated
E-5
TFORMCVT: Converting From TGAL to TFORM
TFORMCVT
Diagnostic Messages
If TFORMCVT encounters a command that can’t be translated to TFORM,
or that is positioned wrongly for TFORM’s requirements, or that may have
an unforeseen effect, it inserts one or more comments in the output file at
the point where the command appears. At the end of the file, it attaches
comments that tell how many such warnings were issued and where the
last one occurred; that warning in turn indicates where the previous one
occurred, and so on to the first error in the file.
Untranslatable Commands
If a valid TGAL command has no TFORM equivalent, TFORMCVT
converts the input TGAL command into a comment and flags the
command with a warning message that lists the edit input line number. If
there were any previous warning messages, TFORMCVT adds another
comment that shows the line number where the last error message
occurred. For example, if LINENO ON occurred on line 133.3 and the
previous warning message was on line 127, TFORMCVT shows the
following in the output file.
\COMMENT LINENO ON
\COMMENT ^ WARNING **** COMMAND NOT RECOGNIZED. LINE:
\COMMENT **** LAST WARNING OCCURRED ON LINE:
127
133.3
This error message applies to the following four commands.
E-6
1.
LINENO commands
2.
An OUT command containing one or more text strings
3.
An OV command that attempts to overprint more than two different
characters other than “_” in a given character position.
4.
PAUSE commands
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
Sourced Files
TFORMCVT cannot tell whether a file named in a TGAL IN command is a
TFORM file or a TGAL file, so it inserts the following message following
the resulting TFORM SOURCE command. The second line appears only on
later occurrences of IN command translation.
\COMMENT ^ WARNING **** SOURCE FILE MAY NEED TRANSLATION.
\COMMENT **** LAST SOURCED FILE OCCURRED ON LINE: n
Page-Oriented Commands
LINE: n
Some translated commands may not behave in the same way that TGAL
commands do unless they appear immediately following a page break.
These TGAL commands all translate to TFORM PRINT commands or pageoriented STYLE commands. When this happens, TFORMCVT displays the
following messages. The second comment appears only on subsequent
occurrences.
\COMMENT ^ WARNING***COMMAND MUST FOLLOW \NEW COMMAND. LINE: n
\COMMENT **** LAST WARNING OCCURRED ON LINE: n
This error message applies to the following four TGAL commands:
Error Summary
1.
BOTTOMMARGIN
2.
OUTLEN
3.
PAGELEN
4.
TOPMARGIN
At the end of the output file, TFORMCVT adds the following comments if
it has inserted any warning messages anywhere in the file.
\COMMENT **** NUMBER OF WARNINGS: n
\COMMENT **** LAST WARNING OCCURRED ON LINE: n
If the file contains any commands to source in other files, TFORMCVT adds
the following messages to the end of the file.
\COMMENT **** NUMBER OF SOURCED FILES: n
\COMMENT **** LAST SOURCED FILE OCCURRED ON LINE:
11387 Tandem Computers Incorporated
E-7
TFORMCVT: Converting From TGAL to TFORM
Command Translation
Summary
Note
The following descriptions are organized alphabetically by TGAL
command. Each syntax option for the TGAL command is boxed, with the
TFORM translation following. If there are special considerations for a
given TGAL command—such as differences between the TGAL input and
the translation, or error messages that may be displayed in certain
situations—this information is collected under the heading “Tips” for each
command.
When several TGAL commands appear on the same line separated by semicolons,
TFORMCVT outputs their translations on separate lines.
ALT Command
\ALT ON int
The TFORMCVT output is:
\PRINT OFFSET ODD int CHARS
\ALT ON int ALWAYS
The TFORMCVT output is:
\PRINT OFFSET ODD int CHARS
\ALT OFF
The TFORMCVT output is:
\PRINT OFFSET 0 CHARS
E-8
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
Tips
The TFORMCVT translation of the ALT command is effectively the
translation of ALT ON ALWAYS since TFORM doesn’t care if page
numbering is in effect during alternation. If ALT is ON and page
numbering is off in the input file, alternation occurs in the TFORM
translation even though it would not in TGAL output.
In TGAL, when ALT is ON and TAG is in effect, the tag characters
appear on the same side as the page number. In TFORM, the tag
characters always appear on the right side of the page.
TFORMCVT follows the translation of ALT ON with updated header
and footer commands. If a HEAD command is in effect, TFORMCVT
updates it as:
\HEADER 1
\HEADER 1 EVEN "text"
\HEADER 1 ALL ODD "||text"
If a SUBHEAD command is in effect, TFORMCVT updates it as:
\HEADER 2
\HEADER 2 EVEN "text"
\HEADER 2 ALL ODD "||text"
11387 Tandem Computers Incorporated
E-9
TFORMCVT: Converting From TGAL to TFORM
TFORMCVT always updates the SECT command to change the pagenumber position:
\FOOTER 2
\FOOTER 2 EVEN "text#"
\FOOTER 2 ALL ODD "||text#"
As with TGAL, if the CENTER option for the SECT command is in
effect, TFORMCVT doesn’t update it. If a HEAD or SUBHEAD
command appears while the ALT command is in effect, TFORMCVT
outputs it as shown above. If the SECT command appears while the
ALT command is in effect, the TFORM command PAGE int precedes
the output for SECT shown above.
TFORMCVT follows the translation of ALT OFF with the original
headers and footer, if any were in effect.
ARROW Command
\ARROW ON
TFORMCVT doesn’t output a TFORM command for this command, but
sets an internal flag so that all subsequent BOX ON commands will
generate the command SET BOX ON ARROW.
\ARROW OFF
TFORMCVT doesn’t output a TFORM command for this command, but
sets an internal flag.
E-10
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
BLANK Command
\BLANK "char"
TFORMCVT doesn’t output a TFORM command for this command, but
sets an internal flag to cause all instances of the specified character to be
output as the trigger character followed by “#”. If the trigger character is
“\”, TFORMCVT replaces the required blank character with “\#”.
\BLANK
TFORMCVT turns off the internal flag.
Tips
When the BLANK command is controlled by an IF command,
TFORMCVT still outputs all instances of the specified character as
“\#”, regardless of the state of the TGAL variable.
In TGAL, the required blank character has no meaning in strings that
are parameters for commands. TFORMCVT leaves the specified
required blank character in these strings.
11387 Tandem Computers Incorporated
E-11
TFORMCVT: Converting From TGAL to TFORM
BOTTOMMARGIN Command
\BOTTOMMARGIN int
The TFORMCVT output is:
\STYLE MARGIN BOTTOM (int-3) LINES
Tips
TFORMCVT subtracts three lines from the number specified in the
TGAL command since TGAL assumes the bottom margin includes 3
lines at the bottom of each page (a blank line, the FOOT line, and the
SECT line) but TFORM does not.
The TFORM STYLE command must follow a page break to work the
same way as BOTTOMMARGIN. If a NEW command does not
directly precede the BOTTOMMARGIN command, with no
intervening text or SPACE commands, TFORMCVT follows the STYLE
command with the message:
WARNING **** COMMAND MUST FOLLOW \\NEW COMMAND.
E-12
11387 Tandem Computers Incorporated
LINE: n
TFORMCVT: Converting From TGAL to TFORM
BOX Command
\BOX
The TGAL BOX command is used both to commence and to close off box
construction. TFORMCVT can tell from the context what the TGAL BOX
command means and act accordingly. When the BOX command signals
the beginning of a box, the TFORMCVT output is:
\SET BOX ON; INDENT ON BOTH - 3
When the BOX command signals the end of a box, the TFORMCVT
output is:
\INDENT OFF BOTH; SET BOX OFF
\BOX char
or
BOX "char"
The TFORMCVT output is:
\DEFINE BOX SIDES "char"
\SET BOX ON; INDENT ON BOTH - 3
\BOX "char1" , "char2"
The TFORMCVT output is:
\DEFINE BOX SIDES "char1"
\DEFINE BOX TOP "char2"
\DEFINE BOX BOTTOM "char2"
\DEFINE BOX CORNERS "char2"
\SET BOX ON; INDENT ON BOTH - 3
11387 Tandem Computers Incorporated
E-13
TFORMCVT: Converting From TGAL to TFORM
Tips
If ARROW is ON, the TFORM command to turn on a box becomes SET
BOX ON ARROW.
If the box sides were redefined, TFORMCVT outputs the command
DEFINE BOX when turning off the box, restoring the original box-side
characters.
TFORM automatically indents the text within a box, as though the
command INDENT ON BOTH + 3 were present. Since this is not the
case in TGAL, TFORMCVT emits the command INDENT ON BOTH - 3
when turning on a box and INDENT OFF BOTH when turning it off.
If the TAG command applies to lines in a box, the tags appear further
to the right than tags on unboxed lines because of the negative
indentation.
TGAL suppresses line joining within the scope of a box. Since TFORM
allows joining in boxes, TFORMCVT issues a SET JOIN OFF command
at the beginning of a box (if it was on) and turns joining back on at the
end of the box. For example:
TGAL input:
\JOIN ON
\BOX
There once was a man from Peru
Whose limericks ended at two
\BOX
TFORMCVT output:
\JOIN ON
\SET BOX
There
Whose
\SET BOX
ON; JOIN OFF
once was a man from Peru
limericks ended at two
OFF; JOIN ON
A BOX command controlled by an IF command is not recommended,
since TFORMCVT does not keep track of a box that has been turned on
or off under such control.
E-14
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
BREAK Command
\BREAK
The TFORMCVT output is:
\BREAK PARAGRAPHS
The TGAL BREAK command always causes a paragraph break as well as a
line break.
11387 Tandem Computers Incorporated
E-15
TFORMCVT: Converting From TGAL to TFORM
CENTER Command
\CENTER
The TFORMCVT output is:
\CENTER
\CENTER ON
The TFORMCVT output is:
\CENTER ON
\CENTER OFF
The TFORMCVT output is:
\CENTER OFF
\CENTER int
The TFORMCVT output is:
\CENTER int
E-16
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
\CENTER B
The TFORMCVT output is:
\CENTER BLANK
\CENTER \
The TFORMCVT output is:
\CENTER COMMAND
Tips
To center overstruck lines in TGAL, the CENTER command must
specify number of overprinting lines as well as the number of original
text lines. Since the TFORM CENTER command does not work in this
way, text lines following an OV command may be included in the
scope of a CENTER command and be centered.
Conversion of the CENTER number command from TGAL to TFORM is
not accurate if a TGAL OV command occurs within the scope of the
CENTER command. TGAL counts each text line governed by the OV
command as a line to be centered. TFORMCVT processes the OV
command first, reducing all text lines governed by it to one line; when
it then processes the CENTER command, it centers additional lines of
text.
11387 Tandem Computers Incorporated
E-17
TFORMCVT: Converting From TGAL to TFORM
CHANGES Command
\CHANGES
The TFORMCVT output is:
\PRINT PAGES CHANGES
COMMENT Command
\COMMENT
The TFORMCVT output is:
\COMMENT
\COMMENT text
The TFORMCVT output is:
\COMMENT text
E-18
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
DBL Command
\DBL ON
The TFORMCVT output is:
\SET SPACING 2
\DBL OFF
The TFORMCVT output is:
\SET SPACING 1
ERRORS Command
\ERRORS ON
The TFORMCVT output is:
\PRINT ERRORS ON
\ERRORS OFF
The TFORMCVT output is:
\PRINT ERRORS OFF
11387 Tandem Computers Incorporated
E-19
TFORMCVT: Converting From TGAL to TFORM
EXIT Command
\EXIT
The TFORMCVT output is:
\EXIT
FOOT Command
\FOOT "text"
The TFORMCVT output is:
\FOOTER 1 "|text|"
\FOOT "text" TODAY
or
The TFORMCVT output is:
\FOOTER 1 "|text\\(SYS_DATE\\)|"
E-20
11387 Tandem Computers Incorporated
FOOT "text" \\ TODAY
TFORMCVT: Converting From TGAL to TFORM
Tips
TFORMCVT ignores a trigger character preceding the TODAY option.
The first occurrence of the TODAY option causes TFORMCVT to
precede the TFORM command with a call to the macro TODAY (if the
TODAY macro has not been invoked previously). This is done to
initialize the system variable SYS_DATE.
In TGAL, footers are stacked; that is, if the fifth FOOT command (for
example) contains no text, TGAL uses the text specified in the fourth
FOOT command. If the sixth FOOT command also has no text, TGAL
recalls the text from the third command, and so on. TFORM does not
stack footers and TFORMCVT provides no substitution for this TGAL
feature.
If a trigger character occurs in the text string, it appears as four triggers
in the TFORM string to ensure that TFORM accepts the character
properly.
11387 Tandem Computers Incorporated
E-21
TFORMCVT: Converting From TGAL to TFORM
HEAD Command
\HEAD "text"
The TFORMCVT output is:
\HEADER 1; HEADER 1 "||text"
\HEAD "text" TODAY
or
HEAD "text" \\ TODAY
The TFORMCVT output is:
\HEADER 1; HEADER 1 "||text\\(SYS_DATE\\)"
Tips
TFORMCVT ignores a trigger character preceding the TODAY option.
The first occurrence of the TODAY option causes TFORMCVT to
precede the TFORM HEADER command with a call to the macro
TODAY (if the TODAY macro has not been invoked previously). This
is done to initialize the system variable SYS_DATE.
When ALT is turned on or off, the header is updated accordingly. See
the ALT command translation description for details.
If a trigger character occurs in the text string, it appears as four triggers
in the TFORM string to ensure that TFORM accepts the character
properly.
E-22
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
IF Command
\IF
The TFORMCVT output is:
\ENDIF
\IF int ON
The TFORMCVT output is:
\IF TGAL_int=1
\IF int OFF
The TFORMCVT output is:
\IF TGAL_int=0
11387 Tandem Computers Incorporated
E-23
TFORMCVT: Converting From TGAL to TFORM
Tips
TGAL has 10 variables, called “toggles,” numbered 1 through 10;
TFORMCVT provides the corresponding variables TGAL_1 through
TGAL_10. In TGAL, any IF command terminates the previous IF
command. Since an IF command must be explicitly turned off in
TFORM, TFORMCVT issues the ENDIF command where appropriate.
Using IF to control other TGAL commands that do not explicity turn
themselves on or off (BLANK, BOX, and TRANSPARENT) is not
recommended since TFORMCVT does not keep a record of a command
that has been turned on or off under the control of an IF command.
In TGAL, an IF command terminates a NEED command. This is not
the case with TFORM. TFORMCVT can’t provide this feature, since
KEEP OFF can turn off only KEEP ON (not KEEP BLANK, and so on).
E-24
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
IN Command
\IN filename
The TFORMCVT output is:
\SOURCE filename
\COMMENT ^ WARNING****SOURCE FILE MAY NEED TRANSLATION.
LINE: n
As described under “TFORMCVT Diagnostic Messages,” translation of an
IN command always causes a warning message to be included because
TFORMCVT can’t tell if the file to be sourced in is a TFORM file.
JOIN Command
\JOIN ON
The TFORMCVT output is:
\SET JOIN ON
\JOIN OFF
The TFORMCVT output is:
\SET JOIN OFF
Tips
If JOIN is ON and a box is being constructed, TFORMCVT issues
commands to turn off joining explicitly for the scope of the box.
TGAL always removes blank lines that occur at the top of a page.
TFORM removes top-of-page blank lines only when joining is on.
Also, when joining is on, TGAL retains any extra spaces between
words in text; TFORM removes them.
11387 Tandem Computers Incorporated
E-25
TFORMCVT: Converting From TGAL to TFORM
JUSTIFY Command
\JUSTIFY ON
or
JUSTIFY ON ALWAYS
The TFORMCVT output is:
\SET JUSTIFY ON
\JUSTIFY OFF
The TFORMCVT output is:
\SET JUSTIFY OFF
Tips
If JOIN is OFF, the TFORM translation of JUSTIFY ON has the same effect
as TGAL JUSTIFY ON ALWAYS (justify all lines between JUSTIFY ON and
JUSTIFY OFF). If JOIN is ON, the TFORM translation of JUSTIFY ON
ALWAYS has the same effect as TGAL JUSTIFY ON (the last line before
JUSTIFY OFF remains unjustified).
E-26
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
LINENO Command
\LINENO ON
The TFORMCVT output is:
\COMMENT LINENO ON
\COMMENT ^ WARNING **** COMMAND NOT RECOGNIZED.
LINE:
n
LINE:
n
\LINENO OFF
The TFORMCVT output is:
\COMMENT LINENO OFF
\COMMENT ^ WARNING **** COMMAND NOT RECOGNIZED.
There is no TFORM equivalent to the TGAL LINENO command, so
TFORMCVT displays a warning message.
11387 Tandem Computers Incorporated
E-27
TFORMCVT: Converting From TGAL to TFORM
NEED Command
\NEED ON
The TFORMCVT output is:
\KEEP ON
\NEED OFF
The TFORMCVT output is:
\KEEP OFF
\NEED int
The TFORMCVT output is:
\KEEP int
\NEED B
The TFORMCVT output is:
\KEEP BLANK
E-28
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
\NEED \
The TFORMCVT output is:
\KEEP COMMAND
$$
The TFORMCVT output is:
\KEEP 5
Tips
In TGAL, an IF command terminates the NEED command. This is not
the case with TFORM. TFORMCVT can’t provide this feature, since
KEEP OFF will turn off only KEEP ON (not KEEP int, KEEP BLANK,
or KEEP COMMAND).
In TGAL, a NEW command may appear within the scope of a NEED
command without causing an error. TFORM generates an error
message if it finds a NEW command in the scope of a KEEP command.
11387 Tandem Computers Incorporated
E-29
TFORMCVT: Converting From TGAL to TFORM
NEW Command
\NEW
The TFORMCVT output is:
\NEW
\NEW ODD
The TFORMCVT output is:
\NEW ODD
\NEW EVEN
The TFORMCVT output is:
\NEW EVEN
Tips
In TGAL, a NEW command may appear within the scope of a NEED
command without causing an error. TFORM generates an error message if
it finds a NEW command in the scope of a KEEP command.
E-30
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
OUT Command
\OUT int
The TFORMCVT output is:
\PRINT PAGES int
\OUT int1 / int2
The TFORMCVT output is:
\PRINT PAGES int1 / int2
\OUT "text" int
The TFORMCVT output is:
\PRINT PAGES int
\COMMENT "text"
\COMMENT ^ WARNING **** COMMAND NOT RECOGNIZED.
11387 Tandem Computers Incorporated
LINE:
n
E-31
TFORMCVT: Converting From TGAL to TFORM
\OUT "text1" int1 / "text2" int2
The TFORMCVT output is:
\PRINT PAGES int1 / int2
\COMMENT "text1", "text2"
\COMMENT ^ WARNING **** COMMAND NOT RECOGNIZED.
LINE:
n
Tips
There is no TFORM equivalent to a TGAL OUT command that contains
strings, so TFORMCVT does what it can with it and then displays a
warning message.
If there is a trigger character in the specified string, it is doubled in the
output message.
E-32
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
OUTLEN Command
\OUTLEN int
When int is less than or equal to 85, the TFORMCVT output is:
\STYLE MARGIN RIGHT (85-int) CHARS
When int is greater than 85, the TFORMCVT output is:
\STYLE FORM WIDTH (int+2) CHARS \ \STYLE MARGIN RIGHT 2 CHARS
Tips
The STYLE command must follow a page break to work the same way as
OUTLEN. If a NEW command does not precede the OUTLEN command,
with no intervening text or SPACE commands, TFORMCVT follows the
translated command with the message:
WARNING **** COMMAND MUST FOLLOW \NEW COMMAND.
11387 Tandem Computers Incorporated
LINE: n
E-33
TFORMCVT: Converting From TGAL to TFORM
OV Command
\OV
The TFORMCVT output is:
\BREAK PARAGRAPHS
\BOLD or \UNDERLINE or \<
Tips
In TGAL, the OV command causes a break but the TFORM escape
sequence does not. To make the TFORM output behave as in TGAL,
TFORMCVT outputs a BREAK command before the escape sequence.
In TGAL, to center overstruck lines, the CENTER command must
specify the number of lines to be overprinted as well as the number of
original text lines. Since the TFORM CENTER command does not
work in this way, lines following an OV command that follows a
CENTER command may be centered.
E-34
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
TFORMCVT can figure out whether you intend to print in boldface,
underline, or overstrike. If you intend to overstrike (not underline or
boldface, but overprint different characters) two or more different
characters in the same character position, TFORMCVT does what it
can, then generates an error message. For example:
TGAL Input:
\OV 4
SILLY
SILLY
fools
I say
-----
The TFORMCVT output is:
BREAK PARAGRAPHS
COMMENT I say
COMMENT ^ WARNING **** COMMAND NOT RECOGNIZED.
UNDERLINE(\BOLD(S\<fI\<oL\<oL\<lY\<s\)\)
LINE:
n
In TGAL, if JOIN is on and text is overstruck, text lines may be joined
to overprinting lines but overprinting lines are never joined to text
lines. That is, TGAL output always has its overstruck text at the
beginning of a joined line. TFORM treats overstruck text as regular
text. TFORMCVT does not compensate for this difference.
11387 Tandem Computers Incorporated
E-35
TFORMCVT: Converting From TGAL to TFORM
PAGELEN Command
\PAGELEN int
The TFORMCVT output is:
\STYLE FORM LENGTH int LINES
Tips
The minimum page length in TGAL is 1 text line; the minimum page
length in TFORM is 3 lines. Although TFORMCVT can properly
translate a TGAL command of PAGELEN int (where int is less than 15),
TFORM generates an error message for the command when it
processes the file.
The STYLE command must follow a page break to work the same way
as PAGELEN. If a NEW command doesn’t directly precede the
PAGELEN command, with no intervening text or SPACE commands,
the translated command is followed by the message:
WARNING **** COMMAND MUST FOLLOW \NEW COMMAND.
E-36
11387 Tandem Computers Incorporated
LINE:
n
TFORMCVT: Converting From TGAL to TFORM
PAUSE Command
\PAUSE ON
The TFORMCVT output is:
\COMMENT PAUSE ON
\COMMENT ^ WARNING **** COMMAND NOT RECOGNIZED.
LINE:
n
LINE:
n
\PAUSE OFF
The TFORMCVT output is:
\COMMENT PAUSE OFF
\COMMENT ^ WARNING **** COMMAND NOT RECOGNIZED.
TFORM has no equivalent to the TGAL PAUSE command, so TFORMCVT
issues a warning message instead.
POFF Command
\POFF int
The TFORMCVT output is:
\PRINT OFFSET int CHARS
11387 Tandem Computers Incorporated
E-37
TFORMCVT: Converting From TGAL to TFORM
SECT Command
\SECT "text" int
The TFORMCVT output is:
\FOOTER 2; PAGE int; FOOTER 2 "||text#"
\SECT "text" int CENTER
The TFORMCVT output is:
\FOOTER 2; PAGE int; FOOTER 2 "|text#|"
\SECT "text" int CENTER "text2"
The TFORMCVT output is:
\FOOTER 2; PAGE int; FOOTER 2 " |text#text2| "
E-38
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
Tips
If a trigger character occurs in the text string, it appears as four triggers
in the TFORM string to ensure that TFORM accepts the character
properly.
When the number specified is zero, the argument to the PAGE
command is OFF, not 0, and the page-number character (#) doesn’t
appear in the text string. For example, when the TGAL command is:
\SECT "text" 0
The TFORMCVT output is:
\FOOTER 2; PAGE OFF; FOOTER 2 " | |text"
When ALT is turned ON or OFF, the section is updated accordingly;
see the ALT command translation description for details.
11387 Tandem Computers Incorporated
E-39
TFORMCVT: Converting From TGAL to TFORM
SEQ Command
\SEQ ON
The TFORMCVT output is:
\SET SEQUENCING ON
\SEQ OFF
The TFORMCVT output is:
\SET SEQUENCING OFF
Tips
The effects of the TGAL SEQ command and the TFORM SET
SEQUENCING command are different, so identical results can’t be
guaranteed. The TGAL command affects the entire page, while the
TFORM command affects only those text lines between the SET
SEQUENCING ON and SET SEQUENCING OFF commands.
E-40
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
SET Command
\SET int ON
The TFORMCVT output is:
\ASSIGN TGAL_int 1
\SET int OFF
The TFORMCVT output is:
\ASSIGN TGAL_int 0
Tips
TGAL has 10 variables, or “toggles,” numbered 1 through 10; TFORMCVT
provides the corresponding variables TGAL_1 through TGAL_10.
11387 Tandem Computers Incorporated
E-41
TFORMCVT: Converting From TGAL to TFORM
SPACE Command
\SPACE
The TFORMCVT output is:
\SPACE 1 PAGE
\SPACE int
The TFORMCVT output is:
\SPACE int PAGE
Tips
If the SPACE command is in the scope of a NEED (or $$) command,
TFORMCVT omits the PAGE option from the TFORM command.
E-42
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
SUBHEAD Command
\SUBHEAD "text"
The TFORMCVT output is:
\HEADER 2; HEADER 2 "||text"
\SUBHEAD "text" TODAY
or
\SUBHEAD "text" \ TODAY
The TFORMCVT output is:
\HEADER 2; HEADER 2 "||text\\(SYS_DATE\\)"
Tips
TFORMCVT ignores a trigger character preceding the TODAY option.
The first occurrence of the TODAY option causes TFORMCVT to
precede the TFORM HEADER command with a call to the macro
TODAY (if the TODAY macro has not been invoked previously). This
is done to initialize the system variable SYS_DATE.
When ALT is turned on or off, the header is updated accordingly. See
the ALT command translation description for details.
If a trigger character occurs in the text string, it appears as four triggers
in the TFORM string to ensure that TFORM accepts the character
properly.
11387 Tandem Computers Incorporated
E-43
TFORMCVT: Converting From TGAL to TFORM
TAG Command
\TAG "text" ON
The TFORMCVT output is:
\TAG "text" ON
\TAG "text" OFF
The TFORMCVT output is:
\TAG "text" OFF
\TAG "text" int
The TFORMCVT output is:
\TAG "text" int
E-44
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
\TAG "text" B
The TFORMCVT output is:
\TAG "text" BLANK
\TAG "text" \\
The TFORMCVT output is:
\TAG "text" COMMAND
Tips
TFORM has no equivalent command to the TAG command; instead,
TFORMCVT issues a call to a TFORM macro called TAG.
In TGAL, footers are stacked; that is, if the third FOOT command (for
example) contains no text, TGAL uses the text specified in the second
FOOT command. If the fourth FOOT command also has no text, TGAL
recalls the text from the first command. TFORM does not stack footers
and TFORMCVT provides no substitution for this TGAL feature.
In TGAL, when ALT is ON and TAG is in effect, the tag characters
appear on the same side as the page number. In TFORM, the tag
characters always appear on the right side of the page.
If a trigger character occurs in the text string, it appears as four triggers
in the TFORM string to ensure that TFORM accepts the character
properly.
11387 Tandem Computers Incorporated
E-45
TFORMCVT: Converting From TGAL to TFORM
TEXT Command
\TEXT ON
The TFORMCVT output is:
\SET JUSTIFY ON; SET JOIN ON
\TEXT OFF
The TFORMCVT output is:
\SET JUSTIFY OFF; SET JOIN OFF
TODAY Command
\TODAY
 SHORT ["char"]
 LONG



 USA 
 WORLD

 
The TFORMCVT output is:
\TODAY
SHORT [ "char" ]
LONG
USA
WORLD
Tips
TFORM has no equivalent command to the TGAL TODAY command,
so TFORMCVT issues a call to a TFORM macro called TODAY, which
accepts arguments in the same format as a TODAY command and
produces the same results.
If there is a trigger character in the month list, it is doubled in the
output.
E-46
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
TOPMARGIN Command
\TOPMARGIN int
The TFORMCVT output is:
\STYLE MARGIN TOP (int-3) LINES
Tips
TFORMCVT subtracts three lines from the number specified in the
TGAL Command, since TGAL assumes the top margin includes 3 lines
at the top of each page (the HEAD line, the SUBHEAD line, and a
blank line) but TFORM doesn’t.
The STYLE command must follow a page break to work the same way
as TOPMARGIN. If a NEW command does not directly precede the
TOPMARGIN command, with no intervening text or SPACE
commands, the translated command is followed by the message:
WARNING **** COMMMAND MUST FOLLOW \NEW COMMAND.
11387 Tandem Computers Incorporated
LINE
n
E-47
TFORMCVT: Converting From TGAL to TFORM
TRANSPARENT Command
\TRANSPARENT
In TGAL the TRANSPARENT command is used both to turn transparency
on and to turn it off. TFORMCVT can tell from the context to which use
the command is being put. When the command is turning transparency
on, the TFORMCVT output is:
\TRANSPARENT ON
When the command is turning transparency off, the TFORMCVT output is:
\TRANSPARENT OFF
Tips
TFORM has no TRANSPARENT command; instead, TFORMCVT
issues a call to a TFORM macro.
A TRANSPARENT command controlled by an IF command is not
recommended, as TFORMCVT doesn’t keep track of the range of a
TRANSPARENT command that has been turned on or off under the
control of an IF command.
E-48
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
TRIGGER Command
\TRIGGER "char"
The TFORMCVT output is:
DEFINE TRIGGER "char"
Tips
All subsequent translated commands will begin with the specified
trigger character. When the TRIGGER command is controlled by an IF
command, all trigger characters still become the specified trigger,
regardless of the state of the TGAL variable.
TFORM does not permit the use of a blank, number symbol, hyphen,
greater-than symbol, less-than symbol, exclamation point, period, left
parenthesis, or right parenthesis as a trigger character. If the TRIGGER
command specifies one of these symbols, TFORMCVT displays the
message:
WARNING **** TFORM DOES NOT ACCEPT THIS TRIGGER.
11387 Tandem Computers Incorporated
LINE:
n
E-49
TFORMCVT: Converting From TGAL to TFORM
UPSHIFT Command
\UPSHIFT ON
The TFORMCVT output is:
\SET UPSHIFT ON
\UPSHIFT OFF
The TFORMCVT output is:
\SET UPSHIFT OFF
Tips
The effects of the TGAL UPSHIFT command and the TFORM UPSHIFT
command are different; identical results can’t be guaranteed. The TGAL
command affects the entire page, while the TFORM command affects only
those text lines between the SET UPSHIFT ON and SET UPSHIFT OFF
commands.
E-50
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
VERSION Command
\VERSION "text"
The TFORMCVT output is:
\VERSION "text"
Tips
TFORM has no VERSION command; instead, TFORMCVT issues a call
to a TFORM macro that performs the same functions.
In TGAL, footers are stacked (a VERSION command with no text uses
the text from the footer previous to the one currently being displayed).
Footers aren’t stacked in TFORM, and TFORMCVT provides no
substitute for this TGAL feature.
If a trigger character occurs in the text string, it appears as four triggers
in the TFORM string, to match the TAG string.
11387 Tandem Computers Incorporated
E-51
TFORMCVT: Converting From TGAL to TFORM
Special Characters
\
When the TGAL file contains a trigger character alone in column 1, the
TFORMCVT output is:
\BREAK PARAGRAPHS
When the TGAL file contains a trigger character alone in a column other
than 1, the TFORMCVT output is a double trigger (a literal trigger). For
example:
The system name is \PRUNE.
becomes
The system name is \\PRUNE.
$$
When the TGAL file contains a double dollar sign in column 1, not
preceded by a trigger, the TFORMCVT output is:
\KEEP 5
E-52
11387 Tandem Computers Incorporated
TFORMCVT: Converting From TGAL to TFORM
Tips
If the TGAL required blank character is specified as the trigger
character, TFORMCVT does not double it in the output (when it’s not
in column 1); instead, it translates it to the trigger followed by “#”.
TFORMCVT doubles the trigger character (when it’s not in column 1)
in all text lines. TFORMCVT also checks the strings in the following
commands for triggers: FOOT, HEAD, OUT, SECT, SUBHEAD, TAG,
TODAY, and VERSION.
The “$$” command doesn’t cause a break in TGAL, but does cause a
break in zFORM. A situation where a break doesn’t actually occur
through TFORMCVT is one in which one (or both) of the first two lines
of a paragraph begin with “$$.” The example below shows the
difference between the TGAL input and the TFORMCVT output.
TGAL Input:
$$
$$
Mary had a little snake
Whose scales were green as grass,
TFORMCVT Output:
\KEEP 5
\KEEP 5
\INDENT ON 4
Mary had a little snake
Whose scales were green as grass,
\INDENT OFF
11387 Tandem Computers Incorporated
E-53
Appendix
F Moving Between
TFORM and T-TEXT
Running TFORMCVT
In addition to converting TGAL to TFORM files, as described in Appendix
E, the TFORMCVT utility can convert a T-TEXT file to a TFORM file or a
TFORM file to a T-TEXT file.
TFORMCVT provides a bidirectional filter that transforms T-TEXT or
TFORM commands as precisely as possible to their TFORM or T-TEXT
counterparts. This document describes how to run TFORMCVT, as well
as the required input, resulting output, and error handling that the
process entails.
To invoke TFORMCVT, you use a command interpreter implied RUN
command:
TFORMCVT / [IN infile] [, OUT outfile] /
[T-TEXT] [TFORM]
infile
is an EDIT file (file code 101) containing valid TFORM commands, a
T-TEXT file with valid T-TEXT commands (file code 102), or a terminal
from which you enter text and valid TFORM or T-TEXT commands. If
you omit the IN parameters, TFORMCVT accepts input from your
home terminal.
outfile
is an EDIT file for a T-TEXT-to-TFORM conversion or a T-TEXT file for
a TFORM-to-T-TEXT conversion; if you omit the OUT parameter,
TFORMCVT sends its output to your home terminal. The output file
must not now exist; if it does, a FILE CREATE ERROR message results.
11387 Tandem Computers Incorporated
F-1
Moving Between TFORM and T-TEXT
TTEXT
indicates that the input is a T-TEXT file. The output is automatically a
TFORM file.
TFORM
indicates that the input is a TFORM file. The output is automatically a
T-TEXT file.
You can also include standard RUN command options, such as NOWAIT,
between the slashes.
F-2
11387 Tandem Computers Incorporated
Moving Between TFORM and T-TEXT
TFORM to T-TEXT
Translation Overview
The input to TFORMCVT is a syntactically valid T-FORM file.
TFORMCVT does not issue warnings or T-TEXT syntax errors. An invalid
escape in the input file may be ignored or cause TFORMCVT to go into
DEBUG. This should not be a problem if the T-TEXT file is created using
the T-TEXT product.
TFORM is able to recognize two features that are not common in
standalone TFORM but are used by TFORMCVT when it is converting
T-TEXT files to TFORM edit files. One of these features is the
metacharacter \%. To TFORM, this metacharacter represents a hanging
indent that TFORMCVT encountered while working through a T-TEXT file.
Using the metacharacter saves the hanging indent in the converted edit file
so that no information is lost in any subsequent conversion back to T-TEXT.
The other feature is the RULER command. RULER exists as a command in
T-TEXT and exists in TFORM as a feature used primarily by TFORMCVT
during conversion of T-TEXT to TFORM files. The syntax of the RULER
command is RULER int int; the two integers represents new values for the
left and right margins, respectively. Standalone TFORM users are
encouraged to use the STYLE command instead of the RULER command.
The STYLE command does the same things with better results; RULER
exists primarily to aid accurate file conversion by TFORMCVT.
The output is a valid TFORM file. For consistent results, you should store
the options to your default values explicitly in the input file using SF15 in
the T-TEXT Create or Edit Document Menu.
Because joining is ON by default in T-TEXT but not in TFORM, each output
file contains “SET JOIN ON” at the beginning of the TFORM output file. If
the document is making a return trip (the first line of the file contains “SET
JOIN ON”), TFORMCVT does not put “SET JOIN ON” at the beginning of
the file.
11387 Tandem Computers Incorporated
F-3
Moving Between TFORM and T-TEXT
TFORM to T-TEXT
Translation Overview
The input to TFORMCVT is a syntactically valid TFORM file. TFORMCVT
does not issue warnings for TFORM syntax errors. An invalid command in
the input file may be ignored or cause TFORMCVT to go into DEBUG.
This should not be a problem if you have run the input file through
TFORM without errors. The output is a valid T-TEXT file. This file
produces similar output from T-TEXT as the input file does from TFORM.
The following T-TEXT defaults are output at the beginning of each
output file. Each line is preceded by a format command escape and
terminated by a required return escape.
COMMENT WHIP-PROFILE-15-11-83
RULER 1 80 ;SET TAB OFF;SET TAB ON 8, 16, 24, 32, 40, 48, 56, 64, 72
COMMENT WHIP-PROFILE-15-11-83
In addition, the command SET JOIN ON is output because joining is
ON by default in T-TEXT but not in TFORM. If the document is
making a return trip, TFORMCVT does not put in the defaults or SET
JOIN ON.
If an UNDERLINE format escape extends over one input line, it is
terminated at the end of the output line and resumes at the beginning
of the following output line.
If a BOLD format escape extends over one input line, it is terminated at
the end of the output line and resumes at the beginning of the
following output line.
All command lines in the output file are terminated by the required
return.
All blank lines in the output file are terminated by the required return.
A text line followed by a blank line in the output file is terminated by a
required return.
F-4
11387 Tandem Computers Incorporated
Moving Between TFORM and T-TEXT
If your output command line will be longer than 80 characters, the
following error message is displayed:
COMMENT WARNING **** T-TEXT MAY BREAK THIS LINE. LINE: line-number
COMMENT **** LAST WQARNING OCCURRED ON LINE: line-number
The line numbers of the text lines containing the errors (current and
preceding) is indicated in line-number. If this is the first unrecognized
command, the second comment line is not displayed.
If a TFORM command line contains a single trigger character, the
character is converted to a single trigger character. If, however, the
command line contains one or more adjacent trigger characters, each
trigger character is converted to a format escape. TFORMCVT makes
this conversion to allow for such cases as deferred value computation
(for example, \\(x\\) is an indirection escape sequence). Whenever
TFORMCVT converts a trigger character to a format escape, it displays
the following warning message. (If this is the first unrecognized
command, the warning does not include the second comment line):
COMMENT WARNING **** FORMAT ESCAPE REPLACED TRIGGER. LINE: line-number
COMMENT **** LAST WARNING OCCURRED ON LINE: line-number
If your output text line will be longer than 80 characters, TFORMCVT
displays the following error message. (If this is the first unrecognized
command, the warning does not include the second comment line):
COMMENT WARNING **** T-TEXT MAY BREAK THIS LINE. LINE: line-number
COMMENT **** LAST WARNING OCCURRED ON LINE: line-number
11387 Tandem Computers Incorporated
F-5
Appendix G
A FUNCTION
Construct
Examples of Function
and Macro Constructs
You use a function to evaluate an expression and determine its value. It
can also accept and process arguments, but a function cannot produce any
lines of text. A function can only return a single value.
TFORM has a set of system-supplied functions available for your use that
produce such things as the absolute value of a numeric expression, a string
in all lowercase or uppercase letters, a justified string, or the width of a
string in decipoints. If you enter, for example, the ROMAN TFORM
function (which returns the roman equivalent of an integer value) like this:
The Roman equivalent of 2001 is \(roman(2001)\).
The printed results would look like this:
The Roman equivalent of 2001 is mmi.
You can supplement the system-supplied functions by using the
FUNCTION command to write functions of your own.
The lines between the FUNCTION BEGIN and ENDFUNCTION
commands define the actions of the function.
11387 Tandem Computers Incorporated
G-1
Examples of Function and Macro Constructs
FUNCTION Example 1
Let’s start with a simple function where you use TFORM system variables.
Remember, you cannot assign values directly to these variables—TFORM
assigns the appropriate values when you use them. This example returns
the number of lines used on a text page up to the point where this function
is executed:
\FUNCTION tsize BEGIN
\
RETURN SYS_textarealength/SYS_lineheight
\ENDFUNCTION tsize
The value of the expression in the RETURN statement becomes the value of
the function.
FUNCTION Example 2
This example uses the TFORM system-supplied functions FIND and
STRING and the system-supplied variable SYS_filename. This function
strips volume and subvolume names from source file names:
\FUNCTION thisfile BEGIN LOCAL fnloc
\
ASSIGN fnloc FIND(SYS_filename,".",FIND(SYS_filename,"."))
\
RETURN STR(SYS_filename, fnloc)
\ENDFUNCTION thisfile
FUNCTION Example 3
G-2
This example uses the TFORM system-supplied functions ARG and
SELECT. This is a user function designed to evaluate the number of days
that have passed between two specified days. The function is named span.
The construct itself is shown first, and then an example using the function
follows.
11387 Tandem Computers Incorporated
Examples of Function and Macro Constructs
\FUNCTION span BEGIN LOCAL month_from,day_from,month_to,day_to,time
1
\ FUNCTION month_length BEGIN
\
RETURN SELECT(ARG(1),31,28,31,30,31,30,31,31,30,31,30,31)
\ ENDFUNCTION month_length
2
\ASSIGN
\ASSIGN
\ASSIGN
\ASSIGN
\ASSIGN
3
\
\
\
\
\
month_from ARG(1)
day_from ARG(2)
month_to ARG(3)
day_to ARG(4)
time 0
LOOP month_to_month_from
ASSIGN time time+(month_length(month_from)-day_from)+1
ASSIGN day_from 1
ASSIGN month_from month_from+1
ENDLOOP
\ ASSIGN time time+(day_to-day_from)
\ RETURN time
\ENDFUNCTION span
4
5
1 - The function’s name is “span” and five LOCAL variables are defined.
2 - The span function calls another function named month_length. The
month_length function returns to the span function the number of
days for a specified month.
3 - The values of the four arguments to the span function are assigned to
local variables using the TFORM ARG function. The variable time is
given the value of 0.
4 - This loop counts days from the beginning of the last month. The
month_length function is called. The day_from variable is set to –1,
then the month_from variable is assigned the value of month_from
plus 1.
5 - The time variable value is computed by adding the value of time to the
results of day_from subtracted from day_to. This value of time is
stored in span. When the function span is called, this value will be
substituted for span and its four arguments.
11387 Tandem Computers Incorporated
G-3
Examples of Function and Macro Constructs
The following application of span shows how you can use digits to
represent two specified days (the month and day for each) and then call
span to evaluate those digits to produce a result.
When your file is run, span is enclosed in an indirection escape sequence;
this tells TFORM to evaluate the expression (arguments 1, 2, 3, and 4) and
put the resulting value in the text in place of the expression. If it weren’t
enclosed in an indirection escape sequence, the expression would be
treated as normal text and printed literally. Here is an application that uses
the user function span and your input:
Dear Diary,
February 1, 1986:
I start my diary. I want to tell you all about
Steve.
February 25:
\(span(2,1,2,25)\) days have gone by, and he
still hasn't noticed me.
April 3:
It has been \(span (2,25,4,3)\) days since I
wrote, but today's the day he finally said "Hi!"
to me.
May 7 Since he first talked to me, it took
\(span(4,3,5,7)\) days for me to ask him to go
out, but I asked him! Now what?
The digits that you use in the above application correspond to the
following variables:
\(span(2,
1,
2,
day_from
month_from
G-4
11387 Tandem Computers Incorporated
25)\)
day_to
month_to
Examples of Function and Macro Constructs
This is what the result of that application looks like:
Dear Diary,
February 1, 1986:
I start my diary.
Steve.
I want to tell you all about
February 25:
24 days have gone by,
me.
and he still hasn't noticed
April 3:
It has been 37 days since I wrote, but today's the
day he finally said "Hi!" to me.
May 7:
Since he first talked to me, it took 34 days for me
to ask him to go out, but I asked him! Now what?
MACRO Constructs
A macro is a group of commands, a block of text, or a combination of both
commands and text, which is defined as a unit. A macro works much like a
subroutine. You can design macros to accomplish almost any task you
want to perform with TFORM, such as printing a standard body of text or
collecting entries for your index. You can call functions and other macros
within a macro. Unlike a function, a macro can return more than one
value. Tandem supplies seven standard macros to perform TFORM
activities:
HELP
LIST
LETTER
TAG
TI
TODAY
11387 Tandem Computers Incorporated
G-5
Examples of Function and Macro Constructs
Refer to Section 3 under “TFORM Commands” for more information about
these macros.
The lines between the MACRO BEGIN and ENDMACRO commands
define the actions of the macro. A macro must be entered on a line by itself
beginning in column one.
The following examples demonstrate how you can design macros to
accomplish almost any task (subject to the rules of TFORM).
MACRO Example 1
This example creates a macro named point that tells TFORM to increment
the value of point by 1 each successive time it is called. The macro is used
here to build a simple numbered list. The beginning of the input file
contains the MACRO construct:
\MACRO point DELETE
\MACRO point BEGIN
\
IF !DEFINE(POINT_NUMBER)
\
ASSIGN point_number 1
\
ENDIF
\ BREAK
Item \(point_number\):
\ ASSIGN point_number point_number+1
\ENDMACRO point
1
2
3
1 - If the variable point_number is undefined (or not true), then assign it
the value of 1.
2 - The BREAK command tells TFORM to start a new line. Insert the
word “Item,” the result of the point macro, and a colon.
3 - Increment the variable point_number by 1.
G-6
11387 Tandem Computers Incorporated
Examples of Function and Macro Constructs
The following input file uses the point macro to tell TFORM where to insert
the results of the point macro.
\SOURCE $Volume.Subvolume.point
Dear J.D.
I would like to address the following items:
\point
You should not use the phrase "minimal profits
for a lose.
\point
Our loss was not "minor."
\point
Our company is bankrupt; don't refer to it as a
"leave of absence."
Your nephew and V.P.,
Robespierre
The printed results of your input file looks like this:
Dear J.D.
I would like to address the following items:
Item 1: You should not use the phrase
"minimal profits" for a loss.
Item 2:
Our loss was not "minor."
Item 3: Our company is bankrupt; don't refer
to it as a "leave of absence."
Your nephew and V.P.,
Robespierre
11387 Tandem Computers Incorporated
G-7
Examples of Function and Macro Constructs
MACRO Example 2
This example prints a line of bullets from margin to margin. You can use
this to delineate features (say in a program) by sandwiching text between
such lines. In this macro, named dots, the TFORM system variable
SYS_linewidth is used to calculate the width between the left and right
margins:
\MACRO dots DELETE
\MACRO dots BEGIN LOCAL dotted_line
\ASSIGN dotted line ""
\
LOOP SYS_linewidth/WIDTH("*")
\
ASSIGN dotted_line dotted_line&"*"
\
ENDLOOP
\(dotted_line\)
\ENDMACRO dots
\ !
The following input file uses the dots macro to tell TFORM where to insert
the result of the dots macro.
\dots
This simplex macro disables left/right alternation
of headers and footers, for printing single-sided
draft copies.
\dots
\IMACRO simplex BEGIN LOCAL rtside
\ IF ARG(0)<1
\
ASSIGN rtside 1
\
EXITMACRO
\ ENDIF
\ IF UPPER(ARG(1,1))="ON"
\
ASSIGN rtside 1
\ ELSE
\
ASSIGN rtside 0
\ ENDIF
\ENDMACRO
simplex
G-8
11387 Tandem Computers Incorporated
Examples of Function and Macro Constructs
If you run the above macro with a program (in this case a macro named
simplex), the result would look like this:
**************************************************
This simplex macro disables left/right alternation
of headers and footers, for printing single-sided
draft copies.
**************************************************
\IMACRO simplex BEGIN LOCAL rtside
\ IF ARG(0)<1
\
ASSIGN rtside 1
\
EXITMACRO
\ ENDIF
\ IF UPPER(ARG(1,1))="ON"
\
ASSIGN rtside 1
\ ELSE
\
ASSIGN rtside 0
\ ENDIF
\ENDMACRO
simplex
Note
You can change the bullet character, “*”, to another character, such as “+”, if you wish.
11387 Tandem Computers Incorporated
G-9
Examples of Function and Macro Constructs
MACRO Example 3
This example demonstrates a macro designed to collect index entries and
then print the entries. You could use this macro by placing idx strings in
your input file with the particular index item in quotes at the point where
each item appears in your document. See the following input file example.
After you are finished with your document, you make a call to the macro
and tell it to build your index using all the collected index items.
This idx macro also uses a little trick. It takes advantage of the prescan
feature of TFORM: each line is scanned for indirection escape sequences
before the line is processed. By using different values of “j” in a line like
\ASSIGN x y\(j\)
you can treat “y” like an array with “j” as the subscript. What actually
happens is that the prescan substitutes the value of “j” on the line in place
of \(j\), and so different variables (y1, y2, y3, and so on) are used.
G-10
\MACRO idx BEGIN LOCAL j, k, first, last1
1
\
\
\
\
IF ARG(0)<1
ERROR "you forgot your parameter to the idx macro"
EXITMACRO
ENDIF
2
\
\
\
IF !DEFINE(idx_count)
ASSIGN idx_count 0
ENDIF
3
11387 Tandem Computers Incorporated
Examples of Function and Macro Constructs
\
IF UPPER(ARG(1,1))="BUILD"
\
\
ASSIGN k 1
ASSIGN last1 idx_count
4a
\
LOOP
4b
\
\
\
IF idx_count<=0
EXITLOOP
ENDIF
\
\
ASSIGN first 1
ASSIGN j 2
4c
\
LOOP last1-1
4d
\
\
\
IF idx_item\(j\)<idx_item\(first\)
ASSIGN first j
ENDIF
\
\
ASSIGN j j+1
ENDLOOP
\
\
\
\
\
\
\
ASSIGN
ASSIGN
ASSIGN
ASSIGN
ASSIGN
ASSIGN
ASSIGN
item idx_item\(first\)
page idx_page\(first\)
sorted\(k\) item&" "&STRING(page)
k k+1
idx_item\(first\) idx_item\(last1\)
idx_page\(first\) idx_page\(last1\)
last1 last1-1
\
ENDLOOP
\
\
\
NEW
SET JOIN OFF
CENTER
4
INDEX
4e
\
\
SPACE 3
ASSIGN k 1
\
\
\
\
\
LOOP idx_count
ASSIGN printline sorted\(k\)
(printline\)
ASSIGN k k+1
ENDLOOP
\
\
\
\
\
ELSE
ASSIGN idx_count idx_count+1
ASSIGN idx_item\(idx_count\) ARG(1)
ASSIGN idx_page\(idx_count\) SYS_PAGENUMBER
ENDIF
\ENDMACRO idx
11387 Tandem Computers Incorporated
5
G-11
Examples of Function and Macro Constructs
1 - The name of this macro is idx. Your input to this macro either
generates a new index entry or is a command to print an index.
2 - This IF construct checks to see if there is any input (arguments in
TFORM) in your file for this macro. If there is no input or if the input
is incorrect, TFORM displays this error message and exits the macro. If
input exists and is correct, then the next macro statement is executed.
3 - This IF construct creates a counter to keep track of index entries. The
counter, idx_count, is assigned the value of zero.
4 - This IF construct is the main body of the macro. Within this IF
construct, index entries are sorted, saved, and printed. Index entries
are printed only when the keyword BUILD is found in your file. The
nested IF and LOOP constructs within this main IF construct are
flagged with A, B, C, and so forth as follows:
4A - This LOOP construct contains other constructs that sort the
index entries and store the sorted entries.
4B - This IF construct checks to see if there are any remaining index
entries to be processed.
4C - This LOOP construct determines which index entry of the
remaining entries is first in alphabetical order.
4D - This IF construct compares two index entries to put in
alphabetical order.
4E - This LOOP construct prints all index entries alphabetically with
their page numbers. The following application shows the input
file with the idx strings in place, referencing various items for
the index. The last line of the file calls the IDX macro with the
argument BUILD recognized as the keyword for building the
index.
G-12
11387 Tandem Computers Incorporated
Examples of Function and Macro Constructs
The following application shows the input file with the idx strings in place,
referencing various items for the index. The last line of the file calls the
IDX macro with the argument BUILD recognized as the keyword for
building the index.
I would first like to discuss alligators of the swamps
\idx "Vicious lizards"
in Florida, which have been escaping and terrorizing the
nearby neighborhoods. Three recent occurrences are
noteworthy.
•
•
•
\new
Next we move on to examining the swamps themselves. How
\idx "Swamp safety"
safe are they for the casual visitor? Three recent
occurrences are noteworthy.
•
•
•
\new
My final statements focus on predictions for the impact
of man on swamps and their inhabitants. Can
\idx "Impact of man"
neighborhoods continue to exist with the swamps in their
backyards? Should tourists continue to venture
\idx "Swamps for neighbors"
within swamp boundaries? Three recent conclusions are
\idx "Future for swamp tourists"
noteworthy.
\idx
BUILD
11387 Tandem Computers Incorporated
G-13
Examples of Function and Macro Constructs
The result of the input file should look like this:
I would first like to discuss alligators of the swamps
in Florida, which have been escaping and terrorizing
the nearby neighborhoods. Three recent occurrences
are noteworthy.
Next we move on to examining the swamps themselves.
How safe are they for the casual visitor? Three
recent occurrences are noteworthy.
My final statements focus on predictions for the impact
of man on swamps and their inhabitants. Can
neighborhoods continue to exist with the swamps in
their backyards? Should tourists continue to venture
within swamp boundaries? Three recent conclusions are
noteworthy.
INDEX
Future for swamp tourists
Impact of man 3
Swamp safety 2
Swamps for neighbors 3
Vicious lizards 1
G-14
11387 Tandem Computers Incorporated
3
Appendix
H Font Characteristics
Introduction
A typical document is printed using a variety of fonts. For example, a large
font might be used for the title and chapter headings of a document, a
standard-size font might be used for the body of the document, and key
words or phrases might be highlighted using a bold or italic font.
A number of fonts are supplied with a printer; these fonts are referred to as
internal fonts. Additional fonts can be used by the printer by inserting font
cartridges or downloading soft fonts.
Cartridge fonts plug into font cartridge slots on the printer. The fonts
contained in the cartridge become available once the cartridge is plugged
into the printer. A large number of font cartridges can be purchased from
Tandem or an authorized dealer.
Soft fonts are fonts that can be transferred from disks in your computer to
the printer's memory. (The process of transferring soft fonts from disks to
the printer's memory is called downloading.) A large number of soft fonts
can be purchased from a Tandem sales office. Refer to your Font Catalog
for a list of available soft fonts.
Keep the following considerations in mind when using downloaded soft
fonts to get the most efficient use from the printer. This information is
especially helpful in situations where printers are shared by several users.
The printer has a limited amount of memory in which to store
downloaded fonts. Download only the fonts you need and wait until
you need other fonts before downloading them. This step saves you
unnecessary downloading time and helps prevent exceeding the
printer's memory capacity. Remember that each downloaded font
occupies a portion of memory that cannot be used for anything else
until the font is deleted.
If you use a lot of downloaded fonts, consider purchasing an optional
RAM card. This card expands the printer memory, allowing more
fonts to be stored.
Turning the printer off will delete all the downloaded soft fonts.
11387 Tandem Computers Incorporated
H-1
Font Characteristics
Any internal, cartridge, or soft font can be selected for printing. Fonts are
selected using the TFORM STYLE FONT command (refer to Section 3) or
the FONT rendition control escape sequence (refer to Section 4). This
appendix describes fonts and how to select them.
Font Selection
There are several characteristics used to identify a font; these characteristics
are described in detail later in this appendix. A font is selected by
specifying its characteristics. The font characteristics that must be specified
are: orientation, symbol set, spacing, pitch, height, style, stroke weight, and
typeface.
The printer maintains a table that contains the values of all the currently
specified characteristics. Whenever the printer receives an escape sequence
specifying a font characteristic, the printer records that characteristic in the
table.
The printer selects a font based on the priorities of the characteristics in the
table. The priorities of the characteristics are shown in Table H-1.
Table H-1.
Priorities of Font Characteristics
Characteristic
Priority
highest
Orientation
Symbol set
Spacing
Pitch
Height
Style
Stroke weight
Typeface
lowest
H-2
11387 Tandem Computers Incorporated
Font Characteristics
When selecting a font, the printer compares the highest-priority
characteristic in the table to the corresponding characteristic of the
available fonts. If only one font, that font is selected. However, when
several fonts match, the printer compares the next-highest-priority
characteristic to the corresponding characteristic of the available fonts, and
so on down the list. When only one font remains, that font is selected. If,
after comparing all characteristics, more than one font remains, selection is
determined by the priorities of the font locations. The priorities of the font
locations are listed below:
Location
Priority
highest
Soft font
Cartridge font
Internal font
lowest
Note
All cartridge fonts have the same priority regardless of location.
The initial font specification in a job should be made using all the font
characteristics.
11387 Tandem Computers Incorporated
H-3
Font Characteristics
To select a portrait, Roman-8, fixed-spaced, 10 pitch, 12 point, upright,
bold, Courier font, specify each of the characteristics using the STYLE
FONT command and enter it like this:
\STYLE FONT 8
"0, 8U, 0, 10, 12, 0, 3, 3"
|
| |
| |
| | |
|
|
| |
| |
| | |
|
|
| |
| |
| | | Typeface = Courier
|
| |
| |
| | |
|
| |
| |
| | Stroke weight = Bold
|
| |
| |
| |
|
| |
| |
| Style = Upright
|
| |
| |
|
|
| |
| | Height = 12 point
|
| |
| |
|
| |
| Pitch = 10 CPI
|
| |
|
|
| |
Spacing = Fixed
|
| |
|
| Symbol set = Roman-8
|
|
|
Orientation = Portrait
|
TFORM font number
Note
Proportional fonts are not supported. You can, however, get right and left justification.
Default Settings
Default settings refer to settings programmed into a printer at the factory
or settings selected using the control panel. The term default simply means
that the printer uses these settings unless printer commands are used to
select other settings.
Each time a job is printed, some of the printer's feature settings might be
changed from their default values to produce the desired printed output
for that job.
There are ten default fonts in TFORM. These default characteristic values
are shown in Table H-2.
H-4
11387 Tandem Computers Incorporated
Font Characteristics
Table H-2.
Default Fonts and Characteristic Values
Font
Orientation
Portrait
Symbol Set
Roman-8
PC-8
Latin1
Spacing
Fixed
Pitch
10 CPI
16.6 CPI
Height
12 Pt
8.5 Pt
Style
Upright
Stroke Weight
Medium
Bold
Typeface
Courier
Line Printer
0
1
2
3
4
5
6
7
8
9
= 00
0
0
0
0
0
0
0
0
0
0
= 8U
= 10U
= 0N
8U
10U 10U 0N
8U
10U 10U 0N
8U
10U
=0
0
0
0
0
0
0
0
0
0
0
= 10
= 16.6
10
10
10
10
10
10
10
10
16.6 16.6
= 12
= 8.5
12
12
12
12
12
12
12
12
8.5
8.5
=0
0
0
0
0
0
0
0
0
0
0
=0
=3
0
0
0
0
3
3
3
3
0
0
=3
3
=0
3
3
3
3
3
3
3
0
0
These default fonts correspond to the default internal fonts of the Tandem
Laser-LX printer. You can display them by pressing the PRINT FONTS
button on the control panel of the Laser-LX. Notice that there are no
default italic fonts defined.
11387 Tandem Computers Incorporated
H-5
Font Characteristics
Font Characteristics
A font is a set of characters that have similar characteristics. Fonts are
made up of the following characteristics:
Orientation – Portrait or landscape
Symbol set – Roman-8, PC-8, and so forth
Spacing – Proportional or fixed
Pitch – Characters printed per horizontal inch
Height – Character height (point size)
Style – Upright or italic
Stroke weight – Medium, bold, and so forth
Typeface – Courier, Times Roman, Helvetica, and so forth
Orientation. This characteristic defines the position of the logical page and
the direction of print with respect to the physical page as shown in the
following diagram.
Physical Page
(0, 0)
X
Y ABCD...
Physical Page
Top Margin
X
ABCD...
Y
(0, 0)
Logical Page
Portrait Orientation
Portrait
H-6
11387 Tandem Computers Incorporated
Landscape Orientation
Landscape
Font Characteristics
The orientation characteristic sets the page length, top margin, text length,
and the left and right margins. Once print orientation is chosen, only those
fonts with the corresponding orientation are available for selection. The
default setting is portrait.
Symbol Set. This is a unique ordering of the characters in a font. Each
symbol set is defined with a specific set of applications in mind. Symbol
sets are created for many purposes; for example, the PC-8 symbol set was
designed to support U.S. IBM-PC applications. Table H-3 lists the defined
symbol sets.
11387 Tandem Computers Incorporated
H-7
Font Characteristics
Table H-3.
Defined Symbol Sets
Symbol Set Name
HP Math-7
HP Line Draw
ISO 60: Norwegian Version 1
ISO 60: Norwegian Version 2
HP Roman Extension
ISO 4: United Kingdom
ISO 25: French
ISO 69: French
HP German
ISO 21: German
HP Greek-8
ISO 15: Italian
ISO 14: JIS ASCII
ISO 57: Chinese
Technical-7
HP Math-8
ISO 100: ECMA-94 (Latin1)
OCR A
OCR B
ISO 11: Swedish
HP Spanish
ISO 17: Spanish
ISO 10: Swedish
ISO 16: Portuguese
ISO 84: Portuguese
ISO 85: Spanish
ISO 6: ASCII
HP Legal
ISO 2: International Reference Version
Roman-8
PC-8
PC-8 (D/N)
HP Pi Font
Note
H-8
Symbol Set ID
0A
0B
0D
1D
0E
1E
0F
1F
0G
1G
8G
0I
0K
2K
1M
8M
0N
0O
1O
0S
1S
2S
3S
4S
5S
6S
0U
1U
2U
8U
10U
11U
15U
The printer provides several ISO (International Standards Organization) symbol sets to
support European languages. Refer to the LASER-LX Technical Reference Manual for
details.
11387 Tandem Computers Incorporated
Font Characteristics
Spacing. This is another characteristic that differentiates fonts. Fonts have
either fixed or proportional spacing. Fixed-spaced fonts are those for
which the intercharacter spacing is constant. Proportionally-spaced fonts
are those for which the intercharacter spacing varies with the natural shape
of the character. You can see the difference in the following diagram.
W I
Fixed Spacing
WI
Proportional Spacing
WITH
Inter-Character Spacing
W ITH
Inter-Character Spacing
When proportional spacing is specified and a proportionally-spaced font is
not available, a fixed-pitch font with the current pitch specification is
selected. The default spacing is fixed.
Note
Proportionally-spaced fonts are not supported.
11387 Tandem Computers Incorporated
H-9
Font Characteristics
Pitch. This characteristic describes the number of characters printed in a
horizontal inch (that is, characters per inch or CPI). Pitch applies only to
fixed-spaced fonts, because the number of characters per inch varies for
proportionally-spaced fonts. The default setting ten characters per inch.
The following diagram illustrates the difference between a line of text
printed in 10, 12, and 16.6 CPI.
This pitch is 10 characters/inch
This pitch is 12 characters/inch
This pitch is 16.66 characters/inch
1
INCHES
2
3
Height. This is the measurement of the body of the type in points. A point
is 1/72 inch. The body of the type is slightly greater than the distance from
the bottom of a lowercase letter to the top of a capital letter.
The default height is 12 points. The following diagram illustrates this
measurement by comparing an uppercase H in 42 point Helvetica with its
equivalent lowercase g. The other diagram illustrates different font
heights.
Helvetica 7 point
Helvetica 8 point
Helvetica 9 point
Helvetica 10 point
42 Point Helv
Font
Height
Hg
Helvetica 11 point
Helvetica 12 point
Baseline
Helvetica 14 point
Helvetica 18 point
Helvetica 24 point
H-10
11387 Tandem Computers Incorporated
Font Characteristics
Style. This characteristic is defined by the angle of the strokes of the
characters with respect to the X-axis. Style is either upright or italic. The
default style is upright. The following examples compare the upright and
italic styles.
UPRIGHT UPRIGHT UPRIGHT
ITALIC ITALIC ITALIC
Stroke Weight. This characteristic designates the thickness of the strokes that
compose the characters of a font. Table H-4 shows the different stroke
weights.
Table H-4.
Stroke Weights
Value
Typeface
–7
–5
–3
0
+3
+5
+7
Ultra thin
Thin
Light
Normal
Bold
Black
Ultra Black
The value field (#) specifies the thickness of the strokes used in the design
of the font. The supported stroke weight values are –7 through 7. The
standard stroke weight for a medium font is 0; the standard stroke weight
for a bold font is 3; the standard stroke weight for a light font is –3.
If the specified stroke weight is greater than or equal to 0 and it is not
available, the next available thicker stroke weight is selected. If no thicker
stroke weight is available, the closest available thinner stroke weight is
selected.
If the specified stroke weight is less than 0 and it is not available, the next
available thinner stroke weight is selected. If no thinner stroke weight is
available, the closest available thicker stroke weight is selected.
11387 Tandem Computers Incorporated
H-11
Font Characteristics
The default setting is 0. The following diagram shows light, medium, and
bold stroke weights.
Typeface. This is a generic name for graphics symbols having common
design features. Each typeface has unique and distinguishing
characteristics. Here are three different typefaces:
Table H-5 lists the typeface values that you can specify in the STYLE FONT
command.
H-12
11387 Tandem Computers Incorporated
Font Characteristics
Table H-5.
Note
Typeface Values
Value
Typeface
0
3
4
5
6
8
11
17
18
19
20
21
22
23
24
Line Printer
Courier
Helvetica
Times Roman
Letter Gothic
Prestige
Presentations
Optima **
Garamond **
Cooper Black **
Coronet Bold **
Broadway **
Bauer Bodoni Black Condensed **
Century Schoolbook **
University Roman **
Typefaces that have trailing asterisks (**) might be registered trademarks of a third party.
Use of these fonts might be conditional upon a licensed grant from the owners of the fonts.
Tandem makes no representation as to the quality or performance of the fonts, and
reference to the fonts does not grant any license or right to use the fonts.
The default typeface is courier. For more information about the Laser-LX
printer, refer to the LASER-LX Technical Reference Manual.
11387 Tandem Computers Incorporated
H-13
Index
5530 printer
and device type 5-7
and the MANUAL option
printing to terminal 3-113
effects of
LEVEL macro 3-77
SET command 3-130
how to specify 6-3
metacharacter and correct proportional
pitch 4-5
printing documents 3-109
shadow-printing 4-8
A
Abbreviate keywords 1-3
ABS function
description , syntax, and type 5-21
Addition (+) operator 5-18
ADDRESS macro
description and how to use 3-68
Advanced features
auxiliary files 3-31
ALIGN function
description , syntax, and type 5-23
ALPHABETIC
used as a bullet in a list 3-86
alphabetic lists 2-23
Alphabetic lists
See ALPHABETIC
ALTERNATE
option for STYLE CHANGES 3-138
11387 Tandem Computers Incorporated
Index–1
Index
APPEND
used in a macro 3-99
when using a function construct 3-43
ARG function
description, syntax, and type 5-24
using in a macro 3-102
ARROW
inserting in a box 3-119
ASSIGN
and indirection escape sequences 4-11
description and syntax 3-6
use to give variables a value 5-5
when and how to use 3-6
Auxiliary files
how many can you manipulate 3-31
maximum that can be opened 3-36
B
Backslash character (\) 1-2, 1-6
BEGIN
beginning of a macro 3-99
BEGIN LIST
ALPHABETIC 2-22
definition 2-21, 3-85
how to use in a list 3-86
NUMERIC 2-22
ROMAN 2-23
Binary operators
description 5-17
list of 5-18
Index–2
11387 Tandem Computers Incorporated
Index
Bit-map data
sending to the printer 3-34
BLANK
option to the VERBATIM command 3-162
Blank
lines
inserted in a box 3-119
specify for table of contents 3-80
pages
when one prints 2-13
space
in your text 2-12
use a trigger character 4-4
BOLD
description 4-6
used in titles 3-77
Boolean
“and”(&&) operator 5-19
combining 5-19
expression 5-3
inclusive "or" (//) operator 5-19
results as TFORM views it 5-17
returning a true value using a function 5-25
Boxes
and spaces 2-23
changing horizontal and vertical sides 2-24
creating several side by side 3-95
inserting an arrow 2-24, 3-119
defining
sides and corners 3-23
top and bottom 3-22
11387 Tandem Computers Incorporated
Index–3
Index
ending 2-24
simple usage 2-23
SET (STYLE command option)
creating a box 3-119
BREAK 2-8
description and syntax 3-9
how to use 3-10
trigger character 3-10
BULLET
using with a list of items 3-87
Bulleted lists 2-22
C
Cancelling
indentation 3-59
left indentation 3-61
Capitalization in specific place in text 2-29
Carriage return and a trigger character 4-5
CENTER command
a line break 2-10
and heads 2-20
description and syntax 3-11
examples 2-10
how to use 3-12
line breaks 3-10, 3-12
Centered heads 2-20
Centered title 3-19
Index–4
11387 Tandem Computers Incorporated
Index
CHANGES command
allowing enough space for change marks 3-15
alternating change bars 3-138
control printing of change bars 3-120
description and syntax 3-13
examples 2-26
print only pages with changes 3-115
used with the TODAY command 3-158
Changing
default margins 2-4
headers in text 3-49
source file 1-5
system, volume, and subvolume 3-26
Characters printed per inch H-12
CHARS
unit of measure 1-4
used in print offset 3-117
used with paper size 3-139
CHR function
description, syntax, and type 5-25
Clearing tabs 2-25
Closing files 2-31
CM (centimeter)1-4
Collating sequence and operands 5-19
Command and program entities
rules 1-3
Command name
specifying multiple 2-4
used in this manual 1-3
values 1-3
11387 Tandem Computers Incorporated
Index–5
Index
Commands
and the IF construct 3-57
ignoring TFORM and printing 3-161
TODAY 3-156
ASSIGN 3-6
BREAK 3-9
CENTER 3-11
CHANGES 3-13
COMMENT 3-16
CONTENTS 3-18
DEFINE 3-21
ENV 3-26
ERROR 3-29
EXIT 3-30
FILE 3-31
FOOTER 3-37
HEADER 3-46
HELP 3-50
INDENT 3-58
KEEP 3-62
LETTER 3-64
LEVEL 3-71
LIST 3-83
list of
control type 3-3
formatting type 3-1
programmatic type 3-4
LOOP 3-94
MACRO 3-98
NEW 3-103
Index–6
11387 Tandem Computers Incorporated
Index
overview of 3-1
PAGE 3-105
PRINT 3-108
SET 3-118
SOURCE 3-131
SPACE 3-135
STYLE 3-137
that cause mandatory line breaks 3-10
that stop the joining of text 3-123
TI 3-151
TIME 3-153
TITLE 3-153
VERBATIM 3-161
COMMENT command
description and syntax 3-16
examples 2-15
placement of in command line 3-17
Comments
See COMMENT 15
Concatenation operator 5-18
Conditional
operations and formatting 3-55
processing 2-31
Constant expression
description 5-2
Construct 2-31
See also FUNCTION 32
See also IF construct
See also MACRO 32
function 3-42
LOOP 3-94
11387 Tandem Computers Incorporated
Index–7
Index
CONTENTS command
creating partial 3-20
description and syntax 3-18
how many section levels 3-72
how to use 3-19
printing 3-19
used in LEVEL macro 3-79
used with the TITLE command 3-155
using double indirection escape sequences 4-13
Control
characters
and printing 1-8
list of current values of 3-53
redefining 3-25
commands 3-3
Control-Y 3-30
Conversion values for units 1-4
Converting
expressions to string 4-11
system variables 3-92
COPIES parameter
option of PARAM command 6-2
Creating
a table of contents 2-21
any list 2-21
blank space in your text 2-12
lists 2-21
superscript or a subsript 2-28
Customized form letters 3-64
Index–8
11387 Tandem Computers Incorporated
Index
D
Date
formatting current date with digits 3-157
how to include in your document 3-156
resetting system date 3-160
DD (number of day) 3-157
DECIPOINTS (unit of measure) 1-4
Decipoints
and indentation 3-60
Defaults
a list of items 3-87
a summary of environmental settings C-1
footer and header gaps C-1
form length C-1
overstrike character 4-7
printer fonts H-5
DEFINE
description and syntax 3-21
line breaks 3-10, 3-25
within a macro construct 3-101
BOX
changing sides 2-24
function
description, syntax, and type 5-25
OVERSTRIKE
changing default 2-27
DELETE (MACRO command option)
deleting a macro name 3-100
Descriptive list
string label for most recent item expression
stored where 5-15
11387 Tandem Computers Incorporated
Index–9
Index
Descriptive lists 3-88
DEVICE^TYPE parameter
option of the PARAM command 6-3
Division (/) operator 5-14
Double indirection with escape sequences 4-13
DOWN (for subscripts)
description and syntax 4-8
Downloadable fonts H-1
DOWNSHIFT (SET command option)
convert uppercase to lowercase 3-121
Drawing boxes 3-21
Duplication error 1-7
E
ELSE
and the IF construct 3-55
END LIST
definition 2-21, 3-85
rules 3-92
End-of-file
and the table of contents 3-20
ENDFUNCTION
definition G-1
ENDIF
and the IF construct
ENDLOOP
terminating a loop 3-96
ENDMACRO
ending a macro 3-100
Index–10
11387 Tandem Computers Incorporated
Index
ENV
description and syntax 3-26
how to use 3-27
Equal to (=) operator 5-15
Error 3-28
control printing pages with 3-111
description and syntax 3-29
end-of-file 3-33
GUARDIAN 90 file system stored where 5-7
minimizing line too long 2-8
reporting errors when processing input 3-121
writing an error message 3-29
Escape
characters
list of 3-24
sequence
defintion and examples 2-27
description 4-1
help 3-52
Evaluating an expression
then converting to a string 4-11
Evaluating strings of system variables 3-54
EVEN (NEW command option) 3-104
Even-numbered pages and footers 3-38
EXIT command
description and syntax 3-30
use when printing 3-115
EXITLOOP
terminating a loop 3-96
EXITMACRO
terminating macro execution 3-100
Expression types 5-3
11387 Tandem Computers Incorporated
Index–11
Index
Expressions
description and rules 5-1
description of
complex and primary 5-2
evaluating
compound 5-20
using functions 3-41
examples 5-3
syntax 5-4
External name
See SOURCE
F
FILE command
description and syntax 3-31
how to use 3-32
CLOSE option 3-35
OPEN option 3-32
overview 2-30
READ option 3-33
WRITE option 3-33
File
auxiliary,using 2-30
checking for command errors 3-36
closing when stopping TFORM 3-36
code 3-31
correcting not found error 3-28
inserting comments 3-16
opening for read or write access 3-32
source in an input file into your document 3-131
sourcing in how many 2-30
Index–12
11387 Tandem Computers Incorporated
Index
File name
when it is expanded 3-27
FILE READ
use to give variables a value 5-5
FILE WRITE
example using indirection 4-16
FIND function
description, syntax, and type 5-25
Fixed-spaced fonts H-9
Flexible units 1-4
FONT (rendition control)
description how to change text 4-6
FONT (STYLE command option)
different fonts H-1
specifying fonts when printing 3-139
Font characteristics
See Fonts
Fonts
a list of characteristics H-7
an example of using the FONT command H-4
choosing one H-2
description H-1
height H-12
pitch H-12
spacing H-9
stroke weight H-14
style H-14
symbol set H-8
typeface H-15
11387 Tandem Computers Incorporated
Index–13
Index
FOOTER command
and the page number 3-39
appearing on current page 3-39
blank footer 3-40
changing in text 3-40
creating a blank page 3-40
default gaps C-1
description and syntax 3-37
how to use 3-38
line break 3-10, 3-40
maximum number 3-37
pitch changes 3-40
used with the TITLE command 3-155
using double indirection escape sequences 4-13
Footers
how many 2-7
margins 2-7
setting 2-6
setting margin of 3-144
single-spaced 2-7
Forcing a line break 2-8
FORM (STYLE command option)
specifying the size of the paper 3-139
Form letters, generating 2-31
FORM parameter
option of the PARAM command 6-6
Form width and length defaults C-1
FORMAT (LIST command option)
modifying labels in a list 3-90
Index–14
11387 Tandem Computers Incorporated
Index
Formatting
defaults 1-8
lines 3-118
list of commands 3-1
metacharacters to perform special 4-1
sentence examples 2-16
Freeing up
space for more text 3-40, 3-49
FUNCTION
construct description G-1
rules 5-20
description and syntax 3-41
example G-2
how to use 3-42
overview 2-32
placement of 3-45
returning a value 5-21
terminating 3-43
versus a macro 3-45
writing an error message for 3-29
Functional expression
description and rules 5-2
G
GAP (LIST command option)
lines separating list items 3-90
overriding a paragraph 3-149
space between
text and header3-140
text and footer 3-141
11387 Tandem Computers Incorporated
Index–15
Index
Gaps
between paragraphs 2-16, 3-146
default 2-7
Global variables 3-43
in a macro 3-99
Greater than
(>) operator 5-19
or equal to (> =) operator 5-19
GUARDIAN 90
assigned file code 5-7
file system error 5-7
name of input file 5-7
PARAM command 6-1
H
HEADER command
creating a blank page 3-40
description and syntax 3-46
how many 3-46
line breaks 3-10
page numbers 3-48
pitch changes 3-40
used with the TITLE command 3-155
using double indirection escape sequences 4-13
Header default gaps C-1
Headers
controlling
spacing 2-19
the style 2-20
how many 2-7
left and right 2-6
Index–16
11387 Tandem Computers Incorporated
Index
margins 2-7
setting 2-5
single-spaced 2-7
Headings
Level 0 2-18
specifying levels of 3-72
Height
font characteristic description H-12
HELP command
description and syntax 3-50
examples 3-51
how to use 3-51
HOLD parameter
option of the PARAM command 6-7
Hyphenating words
using a trigger character 4-2
Hyphenation
and syllables 3-122
controlling 2-25
HYPHENS (SET command option)
controlling output text 3-121
I
IF construct
description and syntax 3-55
how to use 3-56
overview 2-31
INCHES (unit of measurement) 1-4
INDENT command 2-12
description and syntax 3-58
how to use 3-59
11387 Tandem Computers Incorporated
Index–17
Index
input and output lines 3-61
more or fewer lines 2-12
ON and OFF tips 3-61
similiar to TI 3-152
used with paragraphs 3-146
Indentation
and the IF construct 3-57
and unit of measurement 2-11
defaults 2-11, 2-17, C-2
examples 2-10
in a list of items 3-85
in the table of contents 3-79
list of items 3-90
paragraphs 2-17
using the + sign 2-11
when using SET BOX ON 3-119
Indirection
escape sequence
rules 4-11
double indirection 4-13
Input
EDIT file and current line number 5-8
date file was last modified 5-7
GUARDIAN 90 file name 5-7
lines
and joining words 4-5
INDENT 3-61
what effects them 3-151
time when file was last modified 5-8
Integer value 1-3
Invocation command
See MACRO
Index–18
11387 Tandem Computers Incorporated
Index
ITEM (part of LIST command)
used in lists 3-85, 3-92
J
JOIN (SET command option)
and the paragraph SENTENCE option 3-147
controlling paragraphs 3-145
joining lines 3-122
turning off line justification 3-123
what stops joining 3-123
Joining
overriding with BREAK 3-10
text 3-123
indented example 2-8
TFORM's rules 2-8
two words using a trigger character 4-5
JUSTIFY function
description, syntax, and type 5-27
Justifying text
examples 2-9
indentation in your text 2-11
K
KEEP
description and syntax 3-62
effect of using NEW with 3-63, 3-104
line breaks 3-10
page control examples 2-13
using with the SPACE command 3-136
Keywords, abbreviate 1-3
11387 Tandem Computers Incorporated
Index–19
Index
L
LEFT (LEVEL command option)
and heads 2-20
Left justified
heads 2-20
title 3-19
Left margin
See Margins
LEFTINDENT (LIST command option)
indenting a list of items 3-90
LENGTH function
description, syntax, and type 5-29
Length of document
stored where 5-13
Less than
(>) operator 5-19
or equal to (< =) operator 5-19
LETTER (macro)
description and syntax 3-64
how to use 3-66
list file template
overview 2-31
LEVEL command
CONTENTS (option)
definition 3-79
creating table of contents 2-21
description and syntax 3-71
FORMAT (option)
definition 3-74
REFERENCE (option)
definition 3-72, 3-81
Index–20
11387 Tandem Computers Incorporated
Index
section level limits 3-72
simple useage 2-19
spacing around heads 2-19
specifying levels of headings 3-72
use to give variables a value 5-5
STYLE (option)
BOLD 3-77
defaults 3-79
definition 3-76
NUMBER 3-77
UNDERLINE 3-77
UPSHIFT 3-77
style of heads 2-20
used with the TITLE command 3-155
when default is turned off and on 2-20
Library file
for your own macros 3-102
Line
current source stored where 5-8
Line breaks
BREAK comamnd 3-10
CENTER command 3-12
DEFINE command 3-25
effects of KEEP 3-63
FOOTER command 3-40
halting justification 3-124
HEADER command3-49
SET command 3-130
using with the TITLE command 3-155
VERBATIM command 3-162
Line spacing
defaults C-2
11387 Tandem Computers Incorporated
Index–21
Index
Line too long error
minimizing 2-8
using the address macro 3-68
LINES (unit of measure)1-4
Lines
centering 3-11
maximum TFORM can keep together 3-63
LIST command
BEGIN LIST option 3-86
default 2-22
description and syntax 3-83
examples 3-84
how to use 3-85
keyword definition 3-90
macro and the SYS_LNUM variable 5-16
modifying labels 3-90
steps for creating 2-21
List file template block 3-67
Lists and using double letters 2-23
LOCAL
definition 3-43
variables in a macro 3-99
Logical operators
description 5-17
list of 5-19
LONG USA and WORLD
option of TODAY command 3-158
LOOP construct
avoiding an infinite loop 3-97
description and syntax 3-94
how to use 3-96
overview 2-31
Index–22
11387 Tandem Computers Incorporated
Index
LOWER function
description, syntax, and type 5-29
Lowercase
how to specify 2-29
M
MACRO
See Macro
Macro
BEGIN
definition 3-99
customized for letter 3-64
description and syntax 3-98
examples G-6
how to use 3-99
how to use invocation command 3-102
LEVEL macro for section headings 3-71
List of G-5
LOCAL
definition 3-99
name of currently executing 5-9
overview 2-32
passing arguments 3-102
placement of construct 3-101
rules in using options 3-100
summary of 3-5
that maintain system variables 5-15
writing an error message for 3-29
MACRO construct
See Macro
11387 Tandem Computers Incorporated
Index–23
Index
MARGIN (STYLE command option)
left and right 3-142
specifying area around text 3-141
Margins
and indenting 2-12
and printing text with the VERBATIM command 3-162
change left and right temporarily 3-58
changing default 2-4
current indentation value stored where 5-8
defaults C-2
setting space to left and right of 3-143
MAX function
description, syntax, and type 5-29
Maximum
auxiliary files open 3-36
default values for measurements and environment settings
C-1
lines TFORM can keep together 3-63
point pages 3-107
Metacharacters
comment 4-2
description 4-1
MIN function
description, syntax, and type 5-31
Minimum default values
for measurements and environment settings C-1
page offset 3-117
MM (millimeter) 1-4
meaning 3-157
MODULO function
description, syntax, and type 5-31
Index–24
11387 Tandem Computers Incorporated
Index
Multiple commands
semicolons 1-3
Multiplication (*) operator 5-14
N
Names
rules for macros 3-98
rules for variables 5-2
Nested indentation
using INDENT ON or OFF 2-12
NEW command
changing page-formatting 2-14
description and syntax 3-103
effects of using KEEP with 3-63
getting a partial table of contents 3-20
inserting PRINT PAGES command 3-117
leaving blank lines 3-104
line breaks 3-10
page breaks 2-13
using with KEEP 3-104
where to place STYLE commands 3-137
NEW ODD or EVEN page 2-13
NEXTLOOP
command within a loop 3-96
Not equal to (< >) operator 5-19
Notation Conventions 1-3
NUMBER (LEVEL command option)
used in titles 3-78
NUMERIC (LIST command option)
list of items 3-87
11387 Tandem Computers Incorporated
Index–25
Index
Numeric
expression 5-3
lists 2-22
values
changed to string values 3-33
converting to string types 4-11
stored how 5-17
NUMERIC function
description, syntax, and type 5-32
O
ODD (NEW command option) 3-103
Odd-numbered pages and footers 3-38
Opening a file
read or write access 3-32
Operand and operators
mixing types 5-17
Operands
description and rules 5-17
Operating in standalone mode 1-5
Operators
description and the three types 5-17
help for 3-52
ORD function
description, syntax, and type 5-32
Orientation
font characteristic description H-7
ORIF and the IF construct 3-55
Orphans
how to prevent 3-144
Index–26
11387 Tandem Computers Incorporated
Index
Output
lines
INDENT 3-61
what effects them 3-151
specifying what device to use 6-3
specifying what type of output device 5-7
Overprinting characters 4-7
Overriding
a paragraph gap 3-149
sequential page numbers 3-107
OVERSTRIKE (rendition control) description 4-7
Overstriking characters 3-21
Overview of commands 2-1
P
Page
breaks 2-13
breaks and blank lines 3-104
control 2-13
creating a first blank 3-40
description and syntax 3-105
get a page number 3-107
header on current 3-48
header on first 3-47
header on odd 3-47
headers 3-46
minimum offset 3-117
number
in headers 2-7
number stored where 5-9
numbering in points 3-106
11387 Tandem Computers Incorporated
Index–27
Index
shifting whole text area 2-28
starting text on odd 3-103
stop page numbering 3-107
turning numbering on and off 3-105
using with headings 2-19
Page breaks
NEW command 3-103
paragraph control 3-145
preventing with KEEP 3-62
Page counter
when set 3-48
Page formatting
NEW and STYLE commands 2-14
Page number
and footers 3-39
and headers 3-48
consecutively printed 3-40
PAGE using the # (pound sign) 3-107
Paper
where to specify size of paper 3-139
Paper size specifying 2-2
Paragragh
and gaps between 2-16
break 3-10
using the TITLE command 3-155
setting spacing of 3-144
styling
resetting to defaults 2-18
PARAGRAPH
when joining text 3-123
Index–28
11387 Tandem Computers Incorporated
Index
PARAM command
parameters
COPIES 6-2
DEVICE^TYPE 6-3
FORM 6-6
HOLD 6-7
PRINTER^TYPE 6-8
REPORT^NAME 6-9
SPOOLOUT 6-10
setting the environment of TFORM 6-1
Parameters
controlling environmental 3-118
Parenthesis and custom printing 4-6
PCL
description 6-4
printers that recognize 6-3, 6-3
PICAS (unit of measurement) 1-4
Pitch
determining tab stops 3-128
font characteristic
description H-11
horizontal and vertical 3-49
horizontal and vertical spacing 3-124
Plus sign (+)
indentation 2-11
paragraph indenting 2-17
Point page
maximum 3-107
numbering 3-106
POINTS (unit of measurement) 1-4
Pound sound (#) character
11387 Tandem Computers Incorporated
Index–29
Index
PRINT command
BIN (option)
printing on the 5530 printer 3-109
current values of flags 5-10
description and syntax 3-108
DRAFT (option)
printing drafts 3-111
ERRORS (option)
error pages printed 3-111
list of characters of SYS_PRINTFLAGS 3-52
MANUALLY (option)
printing only with 5530 printer 3-112
OFFSET (option)
for hole-punch or binding 3-113
tab settings 3-130
PAGES (option)
printing only
specified pages 3-114
the pages with errors 3-117
WARNINGS (option)
pages with errors 3-115
what order commands processed 3-117
PRINT OFFSET
where to place in document 2-28
PRINT PAGES
examples 2-29
Printers
and superscripts or subsripts 2-28
PRINTER^TYPE parameter
option of the PARAM command 6-8
Index–30
11387 Tandem Computers Incorporated
Index
Printing
all text as is 3-161
at end of document 3-19
begin on new page 3-103
error messages 3-130
metacharacters 4-1
rendition control escape sequences 4-6
sequestial line numbers 2-26
shadow-printing 4-8
specific pages 2-29
specify what font 3-139
specifying how many copies 6-2
text with an overstrike character 2-27
underscore characters under text 4-10
using what type of device 6-8
what devices 1-8
which font to use H-3
with a specified font 4-7
your document 1-8
Processing
conditional 2-31
pipeline 2-31
Programmatic commands
list of 3-4
Proportional spacing
and fonts H-9
using the JUSTIFY function 5-28
Q
Quotes
strings in text 5-17
11387 Tandem Computers Incorporated
Index–31
Index
R
RAM
increasing memory for fonts H-1
Range of a function 3-43
Read access to a file 3-32
Repeating actions
looping 3-94
REPORT^NAME parameter
option of the PARAM command 6-9
RETURN statement
and a function G-2
terminating macro execution 3-100
when using a function construct 3-43
Returning a
single value G-1
value in a function construct 3-42
RIGHT (LEVEL command option)
and heads 2-20
Right justified
heads 2-20
title 3-19
Right margin
See also Margins
change marks in 3-15
RIGHTINDENT
indenting list of items 3-90
ROMAN (LIST command option)
list of items 3-88
ROMAN function
description, syntax, and type 5-33
Roman numeral lists 2-23
Index–32
11387 Tandem Computers Incorporated
Index
RUN command
and the device type specified 5-7
and the LETTER macro 3-66
printing pages 2-29
TFORM examples 1-5
Running TFORM 1-5
S
Section heading
saving in variable 3-81
Section number
stored where 5-16
Section title
begin on even or odd page 3-76
begining on new page 3-75
how to print
left, center, or right 3-77
number of lines before and after 3-74
double indirection escape sequence 4-15
SEC_NUM used with section heading 3-81
SELECT function
description, syntax, and type 5-33
Sending output to the screen 1-7
Sentence ending
TFORM rules 3-148
Sentence formatting
examples 2-16
SENTENCES
option to specify number of spaces 3-147
when joining text 3-123
11387 Tandem Computers Incorporated
Index–33
Index
SEQUENCING
numbering lines in your output 3-125
Sequentail line numbering 2-26
SET command
automatic hyphenation 3-122
BOX (otpion)
effects of a NEW command 3-130
examples 2-23
description and syntax 3-118
DOWNSHIFT ON or OFF 2-29
ERRORS (option)3-121
flags set by 5-12
how to use 3-119
HYPHEN ON
default 2-25
inserting a blank line in a box 3-119
JOIN (option)
description 3-122
JUSTIFY Option)
justifying text lines (left and right) 3-123
JUSTIFY OFF
and the address macro 3-68
line breaks 3-10
list of characters of SYS_FLAGS 3-53
PITCH (option)
horizontal and vertical spacing 3-124
SEQUENCING (option)
numbering lines 3-125
Index–34
11387 Tandem Computers Incorporated
Index
SPACING (option)
examples 2-30
lines between text lines 3-126
TABS (option)
changing tab stops 3-127
TABS ON
default 2-24
UPSHIFT (option)
converting lowercase to uppercase 3-128
SHADOW (option)
rendition control description and syntax 4-8
SHORT USA and WORLD
option of TODAY command 3-157
Single spaced
footers 3-40
headers 3-49
Soft fonts description H-1
SOURCE Command
description and syntax 3-131
external name
of system to expand file names 5-13
of volume and subvolume 5-15
how many files can be opened 2-30
how to use 3-132
nested files 3-134
using with ENV 3-28
Sourcing in other files
See SOURCE 30
11387 Tandem Computers Incorporated
Index–35
Index
SPACE command
and footers 3-39
and headers 3-48
and the PAGE command 3-107
creating a blank page 3-40
description and syntax 3-135
examples 2-12
ignoring SPACE if KEEP is in effect 3-136
line breaks 3-10
overrriding a paragraph gap 3-149
Spaces between sentences
when TFORM chooses not to add 3-150
SPACING
lines between text lines 3-126
Spacing
font characteristic
description H-9
Special effects
creating 2-15
Spooler
level 3 spooling 6-10
Spooler form name
specifying 6-6
SPOOLOUT parameter
option of the PARAM command 6-10
Standalone mode and TFORM 1-5
Starting TFORM 1-5
Steps to use TFORM 1-1
Stopping TFORM
and closing files 3-36
what command 3-30
Index–36
11387 Tandem Computers Incorporated
Index
Storing
a numeric or string value in a variable 3-6
String expression 5-3
STRING function
and the
SYS_CHARS variable 5-6
SYS_PRINTFLAGS variable 5-10
SYS_SETFLAGS variable 5-12
SYS_STACKFLAGS variable 5-13
description, syntax, and type 5-34
used to convert system variables 3-93
Stroke weight
font characteristic description H-14
STYLE command
and formatting sentences 2-16
comands
sourcing into your file 2-30
creating a descriptive list 3-88
description and syntax 3-137
font characteristic
description H-13
FONT command and
FONT rendition control rules 4-7
FONT example of using H-4
gaps between paragraphs
example 2-16
how to use and examples 3-138
line breaks 3-10
page-formatting conditions
where to place 2-14
PARAGRAGH (option)
using when joining text 3-123
11387 Tandem Computers Incorporated
Index–37
Index
overview 2-17
paragraph indenting 2-17
resetting paragraph style to default 2-18
resetting to the default 2-14
SENTENCES (option) 3-147
setting
left and right margin headers 3-143
margin for footers 3-144
paragraph spacing 3-144
using when joining text 3-123
Subroutine
See MACRO
Subscript
creating 2-28
line spacing 2-30
Subscripts
and the SET FIXED option 3-127
using the DOWN rendition control 4-8
Subtraction (-) operator 5-18
Subvolume
changing with ENV 3-26
Superscript
creating 2-28
line spacing 2-30
using the UP rendition control 4-10
Syllables and hyphenation 3-122
Symbol set
font characteristic description H-8
Syntax conventions
list of through help 3-52
System
changing with ENV 3-26
Index–38
11387 Tandem Computers Incorporated
Index
System functions and writing your own G-1
System variables
description 5-5
SYS_BOTTOMMARGIN variable
description and type 5-6
SYS_CHARS variable
description and type 5-6
help for 3-52
SYS_DATE variable
description and type 5-15
used with the TODAY command 3-156
using in a header 3-160
SYS_DAY variable
description and type 5-7
used with TODAY 3-157
SYS_DAYOFWEEK variable
description and type 5-7
SYS_DEVICETYPE variable
description and type 5-7
SYS_FILECODE variable
description and type 5-7
SYS_FILEDATE variable
description and type 5-7
SYS_FILEERROR variable
description and type 5-7
SYS_FILENAME variable
description and type 5-7
SYS_FILETIME variable
description and type 5-8
SYS_FORMLENGTH variable
description and type 5-8
11387 Tandem Computers Incorporated
Index–39
Index
SYS_FORMWIDTH variable
description and type 5-8
SYS_HOURS variable
description and type 5-8
used with TIME 3-153
SYS_INPUTLINENUM variable
description and type 5-8
SYS_LDESC variable
converting to string 3-92
description and type 5-15
used with descriptive lists 3-88
SYS_LEFTINDENT variable
description and type 5-8
SYS_LEFTMARGIN variable
description and type 5-8
SYS_LEVEL0_TITLE
and the LEVEL macro 3-74
SYS_LEVELn_TITLE variable
description and type 5-15
SYS_LINEHEIGHT variable
description and type 5-9
SYS_LINEWIDTH variable
description and type 5-9
SYS_LNUM variable
converting to string 3-92
description and type 5-16
used with descriptive lists 3-88
SYS_MACRONAME variable
description and type 5-9
SYS_MINUTES variable
description and type 5-9
used wth TIME 3-153
Index–40
11387 Tandem Computers Incorporated
Index
SYS_MONTH variable
description and type 5-9
used with TODAY 3-157
SYS_PAGENUMBER variable
description and type 5-9
example double indirection 4-14
when using PAGE ON 3-105
SYS_PARAGRAPHBOTTOM variable
description and type 5-9
SYS_PARAGRAPHGAP variable
description and type 5-10
SYS_PARAGRAPHINDENT variable
description and type 5-10
SYS_PARAGRAPHTOP variable
description and type 5-10
SYS_PRINTFLAGS variable
description and type 5-10
help for 3-52
SYS_RIGHTINDENT variable
description and type 5-11
SYS_RIGTHMARGIN variable
description and type 5-11
SYS_SECONDS variable
description and type 5-11
used with TIME 3-153
SYS_SECTION_NUM variable
and the LEVEL macro 3-74
description and type 5-16
SYS_SETFLAGS variable
description and type 5-12
SYS_STACKFLAGS variable
description and type 5-13
11387 Tandem Computers Incorporated
Index–41
Index
SYS_SYSTEM variable
description and type 5-13
SYS_TABS variable
description and type 5-13
SYS_TEXTAREALENGTH variable
description and type 5-13
SYS_TEXTAREAUNUSED variable
description and type 5-14
SYS_TFORMVERSION variable
description and type 5-14
SYS_TIME variable
how to use with TIME 3-153
system variable used with TIME 3-153
SYS_TOPMARGIN variable
description and type 5-15
SYS_VOLUME variable
description and type 5-15
SYS_YEAR variable
used with TODAY 3-157
SYS_YEAR variable
description and type 5-15
T
T-TEXT
ignoring profile from sourced in file 3-132
Table of contents
See CONTENTS
creating 2-21
TABS
changing tab stops 3-127
Index–42
11387 Tandem Computers Incorporated
Index
Tabs
clearing 2-25
setting a three tab column table 2-25
using 2-24
Terminating the IF construct 3-55
Text
area remaining on the current page 5-14
at the bottom of the page (footer) 3-37
freeing up space for more 3-40
preventing widows and orphans 3-144
with comments 3-16
Text, joining 2-8
TFORM
current version running on your system 5-14
TFORMLIB
system macros location 3-102
variables maintained by macros 5-15
TI command
and indentation 3-61
effects of a blank line 3-152
indenting a single output line 3-151
TIME command
assembling the current time in a standard format 3-153
TITLE command
and footers 3-39
and headers 3-48
and the PAGE command 3-107
fields 3-21
justified, left, center, or right 3-19
line breaks 3-10
placing a title anywhere in a text region 3-153
11387 Tandem Computers Incorporated
Index–43
Index
Titles
double indirection escape sequences 4-13
empty headers 3-49
in footers 3-37
in headers 3-46
in table of contents 3-18
TODAY command
and the SYS_DATE variable
string form 5-15
description and syntax 3-156
how to use 3-157
Tokens after command ignored
error message 3-61
TRANSLATE function
description, syntax, and type 5-35
Trigger character
BREAK command 3-10
changing 3-24
concatenating a word 4-5
definition 1-2
exceptions 1-2
for
a required blank 4-4
backspacing 4-4
comments in text 4-2
hyphenating a word 4-2
tabulation 4-2
placement 1-3
printing 4-1
used with the escape sequence 4-1
when wanting a carriage return 4-5
when you need a microspace 4-5
Index–44
11387 Tandem Computers Incorporated
Index
Typeface
font characteristic description H-15
T_TEXT
and SET CHANGES 3-120
U
Unary operators
description and list of 5-17
UNDERLINE (rendition control)
description and syntax 4-10
used in titles 3-77
Units
conversion values 1-4
list of fexible ones 1-4
used in a STYLE command 3-149
UP (rendition control)
description and syntax 4-10
UPPER function
description, syntax, and type 5-36
Uppercase
how to specify 2-29
UPSHIFT (SET command option)
converting lowercase to uppercase 3-129
used in titles 3-77
User ID and printing 6-9
11387 Tandem Computers Incorporated
Index–45
Index
V
VALUE (indirection escape sequence keyword)
double indirection
description and syntax 4-11
Value out of range error
when using a macro 3-102
Variable expression
description and rules 5-2
Variable values 1-3
Variables
changing its type 3-8
converting system 3-92
declaring for a macro 3-101
description and rules 5-5
help for 3-53
in a macro 3-99
indirect
using the letter macro 3-66
local and global ranges 3-43
maintained by macros 5-15
reading into a file 3-33
saving section heading in 3-81
storing a numeric or string value in 3-6
system
evaluating 3-54
units
when using indentation 3-60
Index–46
11387 Tandem Computers Incorporated
Index
VERBATIM command
description and syntax 3-161
input file contents treat as text 3-133
line breaks 3-10
used in setting sentence endings 3-148
used with paragraphs 3-146
Vertical white space
joining text 3-123
Volume
changing with ENV 3-26
W
WARNINGS
specify whether to report 3-129
Wider lables for lists 3-88
Widows
how to prevent 3-144
in your text 2-17
WIDTH
label of a list item 3-90
WIDTH function
description, syntax, and type 5-36
Write access to a file 3-32
Y
YY
meaning 3-157
Z
Zeroes
when TFORM adds leading 3-153
11387 Tandem Computers Incorporated
Index–47
Index
Special characters
! (exclamation point)
used for the comment 4-2
" (quotation mark) character
meaning in TFORM 3-92
when using in a string 5-17
# (pound sign) character
to get page numbers; 3-107
using with CONTENTS 3-20
for blanks; 4-4
$SYSTEM.SYSTEM.TFORMLIB 3-102
& (ampersand)
joining two words 4-5
+ (plus sign)
paragraph indenting 2-17
- (hyphen)
used with to break a word 4-2
. (period)
when needing a carriage return 4-5
/ (forward slash)
RUN command; 3-66
< (less than sign)
backspace 4-4
< (greater than )
operator 5-19
= (equal sign)
indicate a microspace with a trigger character 4-5
= (equal to )
operator 5-19
> (greater than sign)
tabulation 4-2
Index–48
11387 Tandem Computers Incorporated
Index
> (less than)
operator 5-19
? (question mark)
and the letter macro 3-67
getting help; 3-50
\ (backslash)
letter macro 3-66
_ (underscore character)
using in text 4-10
_ (underscore character)
used in variable names 5-2
| (change mark) character 2-26
| (vertical bar)
change character in the margin 3-13
in headers 3-46
title in table of contents 3-18
11387 Tandem Computers Incorporated
Index–49