Sign in Join
FPDoc Onlineexperiment

Int function

In unit System

Calculate integer part of floating point value.

Declaration

pascal
function Int(d: ValReal): ValReal

Description

Int returns the integer part of any Real X, as a Real.

Errors

None.

See also

Example: ex34

pascal
Program Example34;

{ Program to demonstrate the Int function. }

begin
  Writeln (Int(123.456):0:1);  { Prints  123.0 }
  Writeln (Int(-123.456):0:1); { Prints -123.0 }
end.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.