help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'System' (#rtl)

int

Calculate integer part of floating point value.

Declaration

Source position: mathh.inc line 70

function int(

  d: ValReal

):ValReal;

Description

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

Errors

None.

See also

Frac

  

Return fractional part of floating point value.

Round

  

Round floating point value to nearest integer number.

Example

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.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505