TXTML

The markup language for Subversive (Mobile) Storytelling

math : multiply


DESCRIPTION

<multiply> multiplies a user variable by the given value. Note that floats may be used for division.

Note that if <multiply> 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 - the value to multiply by          
float - (true|false) whether to store decimal values. True by default. Decimals are always restricted to two places.                         


EXAMPLES

...     
     <multiply var="assets" value=".5" />          
...


...     
     <multiply var="guests">
          2
          <get var="couples" />
     </multiply>          
...

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