>Although datetimeto str() does show and rounded time, the timeof will 
reviel a value of 0.9999999 !!. I think i have to use another function like 
"samevalue" ?
>

TDateTime in Delphi is a floating point number (double). The integral part 
is the number of days since a reference date and the fractional part is the 
fraction of a day to represent the time. What you are seeing a problem with 
comparing _any_ floating point numbers. As a general rule, you should not 
compare floating point numbers for equality, since floating point numbers 
are inherently approximations. Instead, compare them to a range. For 
example, suppose you are comparing dollars and cents stored in a floating 
point number. The threshold of significance is a penny, so you would 
consider two numbers N1 and N2 "equal" if:

Abs(N1 - N2) < 0.01

HTH,

Glenn Lawler



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/i7folB/TM
--------------------------------------------------------------------~-> 

-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to