Example (Basic mathematic functions):
var
MyLog: array [1 .. 10]of string;
MyFloat: variant;
begin
MyFloat := (InputFloat('User input', 'Enter a number with a decimal point:')); // 1)
{--------------some matematic functions:--------------}
MyLog[1] := 'SOME MATHEMATIC FUNCTIONS:' + #13#10 +
#9+'Input: '+ FloatToStr(MyFloat) + ';' + #13#10 +
#9+'Absolute value: '+ FloatToStr(abs(MyFloat)) + ';' + #13#10 +
#9+'Trunc: ' + FloatToStr(Trunc(MyFloat)) + ';' + #13#10 +
#9+'RoundTo: ' + FloatToStr(RoundTo(MyFloat, 0)) + ';' + #13#10 +
#9+'Ceil: ' + IntToStr(Ceil(MyFloat)) + ';' + #13#10 +
#9+'Floor: ' + IntToStr(Floor(MyFloat)) + #13#10 +
'--------------------------------------------------------'+#13#10;
OpenLog('Some mathematic functions:'); // 2)
Log(MyLog[1]);
end.
Output in Field-Map Data Collector:
1)
![]()
2)
![]()
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