On 01 Mar 2010, at 22:32, ik wrote:

> So if I need for example to compare currency or something that is floating
> point, how do I do that ?

If it's currency, use the currency type. The currency type is fixed point, not 
floating point, and that's exactly because floating point is inexact while 
fixed point is not.

If you have to compare actual floating point values, then you have to realise 
from the start that your comparison will be inexact. That's why there are 
functions such as math.SameValue() that allow you to specify the precision to 
use when determining whether or not two values are "the same".


Jonas_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to