[fpc-devel] MinCurrency
LacaK
lacak at zoznam.sk
Wed Nov 18 11:13:04 CET 2015
Hi,
When I run this on Win32 (FPC 2.6.4):
==============================================
var
c: currency;
e: integer;
begin
c:=0;
Val('-922337203685477.5808',c,e);
Writeln('c=',c,' , e=',e);
Writeln(StrToCurr('-922337203685477,5808'));
end.
==============================================
I get "correct" results:
-------------------------------------------------------------------------
c=-9.223372036854775808E+14 , e=0
-9.223372036854775808E+14
-------------------------------------------------------------------------
But when I recompile for Win64 I get:
-------------------------------------------------------------------------
c= 0.000000000000000000E+00 , e=22
An unhandled exception occurred at $000000000042B180 :
EConvertError : "-922337203685477,5808" is an invalid float
-------------------------------------------------------------------------
As per documentation: http://www.freepascal.org/docs-html/ref/refsu6.html
-922337203685477.5808 is in range of Currency data type
But in sysstrh.inc is conditional definition of MinCurrency, but none is
-922337203685477.5808
What is right behavior ?
Thanks
-Laco.
More information about the fpc-devel
mailing list