Decrements a numeric variable.
Dec x
Dec x decrements the value of x by 1.
OpenW # 1
Local x = 2.7
Dec x
Print x // Prints 1.7
Although Dec can be used with any numeric variable, the usage of integer variables is recommended in order to achieve the maximum optimisation for speed.
Instead of Dec
x = x - 1
x := x - 1
x -= 1
x--
Sub x, 1
Add x, -1
can be used instead.
When integer variables are used Dec doesn't test for overflow!
Inc, Add, Sub, Mul, Div, ++, --, +=, -=, /= , *=
{Created by Sjouke Hamstra; Last updated: 24/06/2017 by James Gaite}