1. Home
  2. Computing & Technology
  3. Delphi Programming
Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link Back

Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
 

Int

unit
System
category
arithmetic routines

declaration
function Int(X: Extended): Extended

description
Returns the integer part of a number.

Int(X) = X - Frac(X).

example
var x1,x2 : extended;
	
x1 := -2,123;
x2 := 4.987;

x1 := Int(x1);
x2 := Int(x2);

//x1 = -2.0
//x2 = 4.0

in real code

see also
Frac, Round,


 Free Delphi code snippet inside every Delphi Newsletter!
Subscribe to the Newsletter
Name
Email

 Got some code to share? Got a question? Need some help?
Explore Delphi Programming
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2009 About.com, a part of The New York Times Company.

All rights reserved.