The decrement Command

The decrement command subtracts from an existing variable, property, or attribute. It defaults to subtracting 1, but you can change the amount with by. If the target is null, it's treated as 0 before decrementing. If no target is given, it decrements the result (it) of the previous command. This is the opposite of the increment command.

Example

set counter to 5
decrement counter by 2 -- counter is now 3

decrement newVariable -- newVariable is defaulted to zero, then decremented to -1

Syntax

decrement [<target>] [by <expression>]