ROPE Language Reference - "dec"

The "dec" action takes either an integer value or a register reference off the stack. If it was an integer value, then "inc" subtracts one from it and pushes back the result. If it was a register reference, then ROPE subtracts one from the value held in the register (which must be an integer value).

So...

$n dec

Subtracts one from the value stored in $n and puts it back in $n - so the value held in $n is changed.

Where as...

$n get dec

Takes the value held in $n subtracts one from it and pushes the result onto the stack. The value held in $n is not changed in this case.

See Also

inc, get, put, register