postincrement
postincrement(s_var) =>n_result
Description
Takes a variable, increments 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
postincrement( s )
=> 2
s
=> 3
s = 2.2
postincrement( s )
=> 2.2
s
=> 3.2
Related Topics
Return to top