[fpc-pascal] compare currency and double

Xiangrong Fang xrfang at gmail.com
Sun Dec 7 15:44:18 CET 2014


Hi All,

I have the following code:

var
  val: Currency;
  res: Double;
begin
  val := 2345.67;
  res := 1e300;
  if val >= res then WriteLn('val >=res')
  else WriteLn('val < res');
end;

The program compile and runs correctly on Linux x64, and Win7 32bit, but
failed (SIGFPE) on Win7 64bit.

Can I safely compare a Currency against a Double?

Thanks!

Xiangrong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20141207/b45bff27/attachment.html>


More information about the fpc-pascal mailing list