Field-Map Scripting

4.1.3.1.24 Int

Int function



Prototype:

function Int(const X: double): double;

Description:

The Int function returns integer part of X double parameter as double value. Cuts the decimal part. The decimal part returns function Frac.

Syntax:

Int(X); / variable:= Int(X);


Part

Description


variable

A variable declared as double


X

A parameter declared as double

Return value:

integer part of X double parameter as double value



Note: This function is available since version X7.



Example:


var

 x,z : double;


begin

 x:= 1.8;

 z:= Int(x);

 ShowMessage(FloatToStr(z));

end.

// Next examples: Int(-3.8) = -3

//                Int(-3.1) = -3

//                Int(1.1)  =  1



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


Example