The processing of commands is normally from top to bottom. On receipt of the Process command (automatically triggered when item is called during Document Assembly or from DropDown List), Pathagoras quickly scans the document starting from character 1. When it finds a <<*Options* or <<*Optional* block, it performs the requested action. There are two exceptions to the top to bottom rule:

 

(1)<<*Repeat* commands are processed next to last (but still top to bottom). That way, if a <<*Repeat* is within a Optional or Options block that is going to ‘disappear’, there is no sense in processing it.

(2){Simple optionals} that are not part of a group are processed dead last (but still top to bottom).

 

 But, <<*Ask. . .* commands, if present, are always processed first (even if they are not at the top of the document). The are also processed top to bottom, but allow you pin-point control. Like in so many other areas. So, if you need a Repeat handled first, just list in first in the Ask table. You can even process some Repeats first and others last. The groupname (as well as it's order in the AskTable), is key. That's because Ask commands always act only on members of the same !group!.

 

 The same pertains to <<*AskOptional and <<*AskOptions. You can have practically pin-point control over the processing of the various sections of your document by careful and strategic arrangement of your AskTable. Only members of the group are acted upon at the beginning.

 

 Once all elements in the AskTable (and their respective !group! members) have been processed, the remaining Options/Optional and Repeat commands are processed (with repeats being processed last.