!Groups!
Sometimes, the answer to a particular question will lead to a particular answer to a subsequent question. In such cases, rather than responding to each <<*Options/Optional*>> text block, you can create text block ‘groupings.’ When you answer the question, or select a certain option (or set of options) from the first member of the group, Pathagoras will hunt down other members of the group and select the corresponding choices. E.g.,
Structure:
<<*Options*!groupname!(prompt1/prompt2)(etc.)* . . .>>
<<*Optional*!groupname!(prompt)*. . .>>
Note: There must always be two asterisks surrounding 'Options' or 'Optional' (so it will be distinguished from other appearances of these words in your text). If you have added a !group name! or prompts/questions, a final '*' must be used to close that 'administrative' section of the block.
Examples:
We suggest that the color for the living room be <<*Options*!colors!*red/yellow/burnt orange>> and the contrasting trim color be <<*Options*!colors!*yellow/purple/royal blue>>.
<<*Optional*!Disclaimer!Include disclaimer language?*We disclaim all liability if you try to shave your head with our chainsaw.>> (blah blah blah . . .) and furthermore <<*Optional*!Disclaimer!we also disclaim responsibility if you try to use our hedge trimmer to trim your fingernails.>> |
Note: The group name (the text between the two “!” marks) can be no longer than 30 characters.
Note: When used with an *Options* block of text, the automatic selection of subsequent choices by Pathagoras typically depends upon the position of the first choice in the list, not its answer. So, in the first above example, if ‘yellow’ (the second option) is selected when the first *options* block is encountered, ‘purple’ (the second option in the subsequent options *block*) will be selected automatically when it is encountered.
Two 'exceptions' to this rule exist in Pathagoras:
(1) When you !group! a <<*Repeat* . . .> block with an <<*Options* . . .>> block, the selection of the <<*Options* . . .>> text depends upon whether '0', '1' or '2+' is the response to the *Repeat* question. This is discussed here.
(2) When the value being selected/tested is numeric (e.g, grades, scores, temperatures), you can use an <<*AskValue*>> prompt to direct Pathagoras to select a response that falls within various ranges of values. <<*AskValue*>> prompts are discussed here.)
See also: