Board index » delphi » conversion of real number to integer number?????

conversion of real number to integer number?????

how do I do this????

Thanks in advance

 

Re:conversion of real number to integer number?????


Johnny B. Nielsen <johnn...@worldonline.dk> wrote:

Quote
>how do I do this????

trunc() or round() returns an integer.  int(x) returns the
integer part of x as a floating point type.
Jud McCranie

Re:conversion of real number to integer number?????


a: integer;
b: real;
...
a:= trunc(b); {cut of the numbers after the ","}
or
a:= round(b); {do, what it's name says}

"Johnny B. Nielsen" <johnn...@worldonline.dk> schrieb im Newsbeitrag
news:l7ua2t4rrsas2a74b8kldgc1dv6o2qtuib@4ax.com...

Quote

> how do I do this????

> Thanks in advance

Re:conversion of real number to integer number?????


  You might download the 'Delphi Technical Reference Card' at
http://gulfcoastal.hypermart.net .  It has these parameters as
well as many others listed on it.
Quote
"Johnny B. Nielsen" wrote:

> how do I do this????

> Thanks in advance

Other Threads