The processing of <<*Options/Optional*>>commands is normally from top to bottom. On receipt of the 'Process' command (automatically triggered when item is called during Document Assembly or from a DropDown List, or <Alt-P> if manually triggered), Pathagoras quickly scans the document starting from character 1. When it finds an <<*Options*>> or <<*Optional*>> block, it performs the requested action. There are three 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’, no time is wasted processing it.

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

(3)A block that is member of a !group! is processed (top to bottom) immediately after the first member of the group is processed.

 

   <<*Ask*. . .>> commands, if present, are always processed first (even if they are not at the top of the document). They are also processed top to bottom, but allow you pin-point control. 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!.

 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.