TEXT SCRAMBLING in TRIAL VERSION OUTPUT! In evaluation mode, Help+Manual will scramble individual characters in random words in your published output files. This is a limitation of the free trial version. This help system was created with an evaluation copy of Help+Manual.


 

A potentially useful application for the <<*Set*>> commands is to compare or add (or subtract) the values of one or more existing !groupname! values.

  E.g.,

<<*AskRepeat*!NumCats!How many cats?*>>

<<*AskRepeat*!NumDogs!How many dogs?*>>

<<*Set*!NumCritters!=!NumDogs!+!NumCats!>>

 

The resulting value of !NumCritters! can be used anywhere in the document. E.g.,

 We have <<!numcats!>> cats and <<!numdogs!>> dogs. <<!NumCritters!>> pets may seem like a lot, but it's just right for me.

 

Actually, since you might not always have two or more of either kind of pet, you should add an Options block to account for plural vs. singular,and add the 's' as appropriate. You may recall from an earlier lesson that while recording a raw value associated with a Repeat Pathagoras also assigns one of three different 'attributes' to that groupname, 'Zero', 'One' and '2+'. This is called the re: the 0/1/2+ rule. Use this to assign the plural 's' after 'cat' and 'dog' when appropriate.

        We have <<!numcats!>> cat<<*Options*!numcats!*s//s>> and <<!numdogs!>> dog<<*Options*!numdogs!*s//s>>. <<!NumCritters!>> pets may seem like a lot, but it's just right for me.