Pathagoras offers much more power and flexibility to choices made in response to <<*AskOptions*>> blocks.

   In prior versions, the value of the !GroupName! was the numeric equivalent to the choices made. So if 9 choices were presented, and the first fifth and eighth items were checked, the !GroupName! was assigned the value of "1,5,8" Other document logic calculations could be made by reference to that value, but not others were possible.

   Now, in addition to the base group being assigned a value (discussed above), the individual elements of the group are automatically assigned a True/False value (no additional work on your part). Calculations and evaluations anywhere in the document can be done using those individual values.

   An example works best. You can copy and paste the entire block of text to an editing screen. To process it, press <Alt-P>.

--Copy Below--


The below (left column) is a standard ‘AskOptions’ prompt.

Ask Block Text

Before processing

After processing

<<*AskOptions*!Fruit!Apples/Bananas/Cherries*>>

AskOptions block displays the groupname and menu choices you want to provide to end user.

This line will disappear once the Ask block has been answered. If Apples and Cherries are checked, the value of the group name ‘Fruit’ is set to ‘1,3’

 

Document body standard behavior:

Body Text

Before processing

After processing

<<*Options*!Fruit!I eat an apple a day./I like bananas in my cereal./I prefer a cherry on my sundaes.>>

Options block created in normal fashion, with ‘Optional’ designator and groupname followed by the body text.

Since Fruit = "1,3" (per above example), the second option is excised, leaving the first and third options in the document, leaving
I eat an apple a day. I prefer a cherry on my sundaes.

 

NEW: Pathagoras automatically creates a ‘true’ or ‘false’ value
for each element of AskOptions list which may be used in the document body.

Body Text

Before processing

After processing

<<*Optional*!Apples!*An apple a day keeps the doctor away.>>

Optional block created in normal fashion, with ‘Optional’ designator and GroupName followed by the body text.

‘Apples’ was checked in the AskOptions listing per our example above. A new GroupName called ‘Apples’ is established, and its value is set to ‘True’. The text will remain.

<<*Optional*!bananas!*My doctors tells me that bananas are the perfect fruit.>>

“”

Bananas was unchecked in the AskOptions listing. A new GroupName called ‘Bananas’ is established. Its value is ‘False’. The text is deleted.

<<*Optional*!cherries!*Please top my [sundae/milkshake] with a cherry.>>

“”

‘Cherries’ was checked in the AskOptions listing per our example above. A new GroupName called ‘Cherries’ is established. Its value is set to ‘True’ and it will remain.

 

Optional can also accommodate 'True' and 'False' outcome.

 

To enable, just add a '/NEGOPT' (for negative optional) and some 'alternative' text.

If the !Group! value of the optional block is True, the text before the /NEGOPT is kept;

if false, the text after the /NEGOPT is kept.

Body Text

Before processing

After processing

<<*Optional*!apples!*An apple a day keeps the doctor away./NEGOPTThose wormy apples didn’t keep my doctor away.>>

Optional block created in normal fashion. However, a ‘false’ value added. A slash separates the ‘True’ value from the ‘False’. (Coloring, italics and underlining for illustration only.)

‘Apples’ was checked in the AskOptions listing per our example above. A new GroupName called ‘Apples’ is established, and its value was set to ‘True’, so the ‘true’ side of the Optional block will remain.

<<*Optional*!Bananas!*My doctors tells me that bananas are the perfect fruit./NEGOPTYes, I have no bananas.>>

“”

‘Bananas’ was unchecked in the AskOptions listing per our example above. A new GroupName called ‘Bananas’ was established, and its value was set to ‘False’, and the ‘false’ side of the Optional block will remain.

<<*Optional*!Cherries!*Please top my [sundae/milkshake] with a cherry./NEGOPTI don’t want any cherries. They have pits.>>

“”

‘Cherries’ was checked in the AskOptions listing per our example above. A new GroupName called ‘Cherries’ is established, and its value was set to ‘True’. The ‘true’ side of the Optional block remains.

 


--Copy above--

 

MenuOptions2Optional

This is what the selection menu would look like when the above text is initially processed.
Not only will Pathagoras assign a value of "1,3" to the GroupName !Fruit!, but it will
automatically assign "True" to !Apples! and to !Cherries! and  "False" to !Bananas!.

You can then use these values anywhere in the document
in the same way any !groupname! is used.

Created with Help & Manual 7 and styled with Premium Pack Version 2.70 © by EC Software