Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to convert Float to Integer?!

Status
Not open for further replies.

yili

Programmer
Joined
Feb 1, 2004
Messages
1
Location
SG
coulad any body help me?!
I want to use "mod" to find a remainder from a Float,
however, it only works under integer!!!

HELP ME PLEASE!!!!!
I am a new user!!
 
The round or trunc functions will do it. TealWren
 
I normally use Trunc myself:

Var aReal : Real;
aInt : Integer;

aInt := Trunc(aReal);

If aReal is within the integer range!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top