FORM(VI) 6/15/72 FORM(VI) NAME form - form letter generator SYNOPSIS form proto arg ... DESCRIPTION Form generates a form letter from a prototype letter, an as- sociative memory, arguments and in a special case, the cur- rent date. If form is invoked with the proto argument x, the associa- tive 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 con- sole and whatever text is typed in from the console, termi- nated 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 arg is inserted in its place, and that argument is then rescanned. If [0] is encountered, the current date is inserted. If the de- sired 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 re- sponse 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 en- closed in {}. Brackets and braces may be nested. In both of the above cases, the response is typed in by en- tering 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 direc- tory, `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. - 1 - FORM(VI) 6/15/72 FORM(VI) FILES form.m associative memory form? output file (read only) SEE ALSO fed(VI), roff(I) BUGS An unbalanced ] or } acts as an end of file but may add a few strange entries to the associative memory. - 2 -