FORM(I) 6/15/72 FORM(I)
NAME
form - form letter generator
SYNOPSIS
form proto arg ...
DESCRIPTION
Form generates a form letter from a prototype letter, an
associative memory, arguments and in a special case, the
current date.
If form is invoked with the proto argument x, the
associative memory is searched for an entry with name x and
the contents filed under that name are used as the
prototype. If the search fails, the message `[x]:' 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.
Basically, form is a copy process from the prototype to the
output file. If an element of the form [n] (where n is a
digit from 1 to 9) is encountered, the n-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
`[n]:' is typed. The response typed in then is used for
that argument.
If an element of the form [name] or {name} is encountered,
the name is looked up in the associative memory. If it is
found, the contents of the memory under this name replaces
the original element (again rescanned). If the name is not
found, a message of the form `[name]:' 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 {}.
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.
If one of the special characters [{]}\ is preceded by a \,
it loses its special character.
If a file named `forma' already exists in the user's
directory, `formb' is used as the output file and so forth
to `formz'.
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 fed, the form letter editor, or form.
FILES
form.m associative memory
form? output file (read only)
SEE ALSO
fed (I), roff (I)
BUGS
An unbalanced ] or } acts as an end of file but may add a
few strange entries to the associative memory.