From Clomosy Docs
function Abs(X: Integer): Integer; overload;
function Abs(X: Real): Real; overload;
Returns an absolute value.
Abs returns the absolute value of the argument, X.
X is an integer-type or real-type expression.
Example
var
i : Integer;
{
i = -1235;
ShowMessage('Before: '+ IntToStr(i));
//The absolute value of i is taken and put back to i.
i = Abs(i);
ShowMessage('After: '+IntToStr(i));
}
Output:
Before: -1235
After: 1235