Appearance
Int
Declaration
function Int(const X: Extended): Extended
Example
pascal
procedure OnMapEvent(var Value:Variant);
begin
Value := Int(123.45); //result is 123
end;Description
Retuns the Integer portion of a decimal number. This is very similar to Trunc however the result is still a Float (Double, Extended, Currency) data type rather than an Integer (Integer, Cardinal, Int64) data type.
Refer to Frac for a function that returns the fractional part of a decimal number