Algosim documentation: dec


Decrements a number.



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.

See also