@@ -31,19 +31,42 @@ \chapter{Modules}
3131\item [Definitions\index {definitions}] These define new expressions.
3232\item [Executable\index {executable statements} statements] The operations
3333on all active expressions.
34- \item [OutputSpecifications \index {output specifications}] These specify the
34+ \item [Output specifications \index {output specifications}] These specify the
3535output representation.
3636\item [End-of-module specifications\index {end of module specifications}]
3737Extra settings that are for this module only.
3838\item [Mixed statements\index {mixed statements}] They can occur in various
3939classes. Most notably the print statement.
4040\end {description }
4141Statements must occur in such an order that no statement follows a
42- statement of a later category. The only exception is formed by the mixed
43- statements, which can occur anywhere. This is different from earlier
42+ statement of a later category, except as described bellow.
43+ This is different from earlier
4444versions of \FORM \ in which the order of the statements was not fixed. This
4545did cause a certain amount of confusion about the workings of \FORM\@ .
4646
47+ The exceptions are:
48+ \begin {itemize }
49+ \item Mixed statements are permitted in the executable statements,
50+ output specifications, and end-of-module specifications parts of a module.
51+ \item \texttt {Format }\index {format} statements are permitted anywhere.
52+ \item \texttt {ModuleOption }\index {moduleoption} statements that control how \$ -variables are handled
53+ during parallel execution are permitted anywhere.
54+ \end {itemize }
55+ The last exception allows such \texttt {ModuleOption } statements to appear inside procedures
56+ that use \$ -variables and do not contain a \texttt {.sort }.
57+ For example, the following structure is valid:
58+ \begin {verbatim }
59+ #procedure SortlessProc
60+ $procLocalDollar = ...
61+ ModuleOption local $procLocalDollar;
62+ * more executable statements here
63+ #endprocedure
64+
65+ #call SortlessProc
66+ * more executable statements here
67+ .sort
68+ \end {verbatim }
69+
4770There are several types of modules.
4871\begin {description }
4972\item [.sort\index {.sort}] \label {instrsort } The general end-of-module.
0 commit comments