Processing Order, Delaying Processing

 Processing is initiated automatically when a document (or set of documents) is called via the Document Assembly Clause Selection screen or when a document is called from a DropDown List. Processing also begins when the user presses <Alt-P> from the keyboard.

 Processing begins when P detects a balanced '<<' and '>>' sets. (We call these 'double angle brackets' or DAB sets). It ends when no more balanced DAB sets can be found. (We say 'balanced' because there can be nested sets of '<<' and '>>" markers. In a properly structured document, only the outer-most set will be 'balanced.'

 Once a balanced DAB set is detected, Pathagoras processes the command just inside the opening '<<' (e.g.,  *Options* or *Optional* or *Repeat*, and any arguments provided.

 Processing takes place from top to bottom of the document, from outside to inside. The exceptions are these:

1.If a !groupname! is present in the block being processed, all elements of the group will be processed immediately, regardless of intervening '<<. . . >>' blocks. You can take advantage of this 'rule,' and set the order of processing in any fashion you desire, by using <<*AskOptions*, <<AskOptional* and <<AskRepeat* blocks at the top of the document.

2.<<*Repeat* commands are processed after *Options* and *Optional* blocks. That is to allow a possible nested <<*Optional*<<*Repeat*. . .>>>> block to be processed in case the <<*Repeat* is not kept. An exception to this exception is this: if the <<*Repeat*!group!* . . .>> is called via and <<*AskRepeat*!group! . . .>> call, it will be processed in the order of appearance in the AskTable.

3.<<Document call>> (i.e., just the name of a document inside of DABs) are processed last. If the document called in by a <<document call>> itself has DAB sets, they are processed in a recursive fashion, and in the order described above.

4.A '<< . . . >>' call placed within a Content Control is invisible to the Alt-P (or other automatic processing call) unless the cursor is within the Content Control when Alt-P is triggered. When that happens, the content control is erased, and processing begins. Typically the only item that is processed is the command in the Content Control (since presumably the command was in the Content Control to delay its processing until everything else was done), but if there are other unprocessed '<< . . .>>' calls not in Content Controls, they will be processed in the above describe order.
(An alternative way to delay processing of Options text is to place it into a document that you will later call as a document call. But instead of surrounding the call with DABs, simply types its name and following it with "(altg)". Eg., "list of ice cream flavors(altg)". This is a very low tech way of accomplishing your goal. The (altg) can be searched so that you or other users won't miss the call.)