TXTML

The markup language for Subversive (Mobile) Storytelling

math : add


DESCRIPTION

<add> increments a user variable by the given value.

Note that if <add> is used with a variable which is a string, the number format will be applied to the variable first. If the variable has no numeric content, this will result in a value of 0. Best practice is to use the number format with the <set> module when setting variables intended to be numeric.


PARAMETERS

var - which variable to operate on
value - (float) the value to add     
float - (true|false) whether to store decimal values. True by default. Decimals are always restricted to two places.


EXAMPLES

...     
     <add var="right_answers" value="1" />          
...

introduction
installation
authoring txtml
definition
event handlers
flow control
conditions
variables
content
math
other
feeds
requestors
formats
admin interface
extending