Abs |
Top Previous Next |
Prototype
Int/FloatValue:=Abs(Int/FloatInput)
Description
It returns the absolute value of the number assigned by parameter.
Parameters
Int/FloatInput: integer or float number we want the absolute value.
Returned value
Int/FloatValue: absolute value
Notes
None.
Example
// It initializes X and Y integer variable X:=10; Y:=-20;
//It executes some operations X:=X+ABS(Y);
//It logs result ApplicationLog('Test ABS using integer value is: '+IntToStr(X));
// It initializes W and Z float variable W:=10.1; Z:=-20.1;
//It executes some operations W:=W+ABS(Z);
//It logs result ApplicationLog('Test ABS using float value is: '+FloatToStr(W));//30.2 |