On 12 okt 2006, at 14:22, Michael Van Canneyt wrote:

I noticed a strange behavior of the format function. I'm not sure it can be
considered as a bug.
If I use
format('%.3f', [-0.0001])
the resulting string is
-0.000
and not
0.000
Why?

Because your number is negative... The original number is taken to decide
whether it should put the - sign or not. What does delphi do ?

Not only that, but -0.000 is different from 0.000 (at least for the fpu)


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to