FORM (I)                     6/15/72                     FORM (I)


                form -- form letter generator


                form proto arg  ...


                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 pro-


                If the prototype argument is missing, '{letter}'

                is assumed.

                Basically, form is a copy process from the proto-

                type to the output file.  If an element of the

                form [n] (where n is a digit from 1 to 9) is en-

                countered, the nth argument arg  is inserted in
                its place, and that argument is then rescanned.

                If [0] is encountered, the current date is in-

                serted.  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 argu-


                If an element of the form [name] or {name} is en-

                countered, the name is looked up in the associa-

                tive memory.  If it is found, the contents of the

                memory under this name replaces the original ele-

                ment (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 en-

                closed 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 pre-

                ceded by a \, it loses its special character.

                If a file named "forma" already exists in the

                users directory, "formb" is used as the output

                file and so forth to "formz".

                The file "form.m" is created if none exists.  Be-

                cause form.m is operated on by the disc allo-

                cater, it should only be changed by using fed,

                the form letter editor, or form.


                form.m  associative memory

                form?   output file (read only)


                fed(I), type(I), roff(I)


                "cannot open output file" "cannot open memory

                file" when the appropriate files cannot be lo-

                cated or created.


                An unbalanced ] or } acts as an end of file but

                may add a few strange entries to the associative