postdecrement
postdecrement(s_var) =>n_result
Description
Takes a variable, decrements its value by one, stores the new value back into the variable, and returns the original value. This function is a prefix form of s--. The name of the variable must be a symbol and the value must be a number.
Arguments
Value Returned
Examples
s = 2
postdecrement( s )
=> 2
s
=> 1
s = 2.2
postdecrement( s )
=> 2.2
s
=> 1.2
Related Topics
Return to top