dec
Decrements a number.
Syntax
-
dec(x[, n])
-
x
is a variable containing a number -
n
is an integer
-
Description
If x
is a variable that is currently containing a number (which includes integers, rational numbers, real numbers, and complex numbers), then dec(x, n)
decreases the value of x
by n
; hence, its new value becomes x − n
. This value is also returned by the dec
function. If omitted, n
will be set to 1
.
Technically, x
must be an lvalue of type number. It can be a variable or a subscript or member of an object container variable.