Abs

Returns the absolute value of an integer.

Syntax:

Abs (integer)

Parameters:

(i) integer: integer whose absolute value is desired.

Returns:

(i)  absolute value of integer.

 

This function returns the absolute (positive) value of the integer which is passed to it, regardless of whether that integer is positive or negative. If a floating point number is passed as a parameter, it will be converted to an integer.

Example:

y1=1993
y2=1996
dy = Abs(y1 - y2)
Message("Years", "There are %dy% years 'twixt %y1% and %y2%")

See Also:

Average, Fabs, IsNumber, Max, Min