Abs function
Prototype: |
function Abs(const X: extended): extended; |
|
Description: |
The Abs function returns the absolute value of X. |
|
Syntax: |
Abs(X); / variable:= Abs(X); |
|
Part |
Description |
|
variable |
A variable declared as extended |
|
X |
A parameter declared as extended which to be change to absolute value |
|
Return value: |
The absolute value (extended) of the input value (extended) |
|
Example:
var
x,z : extended;
begin
x:= -2.4;
z:= Abs(x);
ShowMessage(FloatToStr(z));
end.
// Next examples: Abs(0) = 0
// Abs(-3) = 3
// Abs(12) = 12
Output in Field-Map Data Collector:

See also:
Power; Round; RoundTo, RoundVariant; Round2int, Cos; ArcCos; ArcCosH; Sin; ArcSin; ArcSinH; ArcTan; ArcTan2; ArcTanH; CosH; SinH; Tan; TanH; Random; RandomRange; Randomize; Floor; Ceil; Int; Frac; Log10; Ln; Exp; Abs; Min; Max; Odd; SecondsBetween;CompareValue; SameValue; Trunc
© 2024 IFER-Monitoring and Mapping Solutions