abs

absolute value

Use: abs( num )
Description: get the absolute, or positive value of a number
Parameters: num  An integer number
Returns:  The absolute value of num
Related:


The abs command returns the positive value of a number.

Example


x = -123      
y = abs(x)
print y         # prints 123