inc, dec, mul, div, mod. Simple operations on numbers

^name.inc[]
^
name.inc(number)
- increases variable's value by 1 or number
^name.dec[]
^
name.dec(number)
- decreases variable's value by 1 or number
^name.mul(number)
- multiplies variable's value by number
^name.div(number)
- divides variable's value by number
^name.mod(number)
- puts into variable the modulus of its value division by number


Example
Code…

$var(5)
^var.inc(7)
^var.dec(3)
^var.div(4)
^var.mul(2)
$var


…will return
4.5 and is equal to construction: $var((5+7-3)/4*2).



Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 20.09.2007