V4/man/man1/form.1

Compare this file to the similar file:
Show the results in this format:

.th FORM I 6/15/72
.sh NAME
form \*- form letter generator
.sh SYNOPSIS
.bd form
proto arg ...
.sh DESCRIPTION
.it Form
generates a form letter from a prototype
letter, an associative memory, arguments and in a special case, the
current date.
.s3
If
.it form
is invoked with the
.it proto
argument \fIx\fR, the associative memory is
searched for an entry with name \fIx\fR and the contents filed under that name are
used as the prototype.  If the search fails, the message `[\fIx\fR]:' is typed on
the console and whatever text is typed in from the console, terminated by
two new lines, is used as the prototype.
If the prototype argument is missing, `{letter}' is assumed.
.s3
Basically,
.it form
is a copy process from the prototype to the output file.
If an element of the form [\fIn\fR] (where \fIn\fR is a digit from 1 to 9) is encountered,
the \fIn\fR-th argument is inserted in its place, and that argument is then
rescanned.  If [0] is encountered, the current date is inserted.  If
the desired argument has not been given, a message of the form `[\fIn\fR]:' is
typed.  The response typed in then is used for that argument.
.s3
If an element of the form [\fIname\fR] or {\fIname\fR} is encountered, the \fIname\fR is looked up in the
associative memory.  If it is found, the contents of the memory under this
\fIname\fR replaces the original element (again rescanned).  If
the \fIname\fR is not found, a message of the form `[\fIname\fR]:' is typed.
The response typed in is used for that element.  The response is
entered in the memory under the name if the name is enclosed in [ ].
The response is not entered in the memory but is remembered for the
duration of the letter if the name is enclosed in {}.
.s3
In both of the above cases, the response is typed in by entering
arbitrary text terminated by two new lines.  Only the first of the
two new lines is passed with the text.
.s3
If one of the special characters [{]}\\ is preceded by
a \\, it loses its special character.
.s3
If a file named `forma' already exists in the user's directory, `formb' is
used as the output file and so forth to `formz'.
.s3
The file `form.m' is created if none exists.  Because form.m is
operated on by the disc allocator, it should only be changed by using
.it fed,
the form letter editor, or
.it form.
.s3
.sh FILES
form.m	associative memory
.br
form?	output file (read only)
.sh "SEE ALSO"
fed(I), type(I), roff(I)
.sh BUGS
An unbalanced ] or } acts as an end of file but
may add a few strange entries to the associative memory.