There is also related bug report: http://bugs.freepascal.org/view.php?id=28737

And look at part of code in rtl/objpas/sysutils/sysstrh.inc:

41 {$if defined(FPC_HAS_TYPE_EXTENDED) or defined(FPC_HAS_TYPE_FLOAT128)}
42       MinCurrency: Currency = -922337203685477.5807;
43       MaxCurrency: Currency =  922337203685477.5807;
44     {$else}
45       MinCurrency: Currency = -922337203685477.0000;
46       MaxCurrency: Currency =  922337203685477.0000;
47     {$endif}

Why is for case not defined(FPC_HAS_TYPE_EXTENDED), MinCurrency defined as is ?

I think that on those targets, some currency handling is still (or was?) implemented via the double type (instead of fixed point using int64),
Is there way how to check current status?
If there is still need for conditional definition ?
(if I look at occurences of MinCurrency in RTL source code, I think, that it can be adjusted ... in other words what is risk of changing MinCurrency and MaxCurrency constants ... IMO is better if they will have same value on all platforms, which supports Int64)

Because for example on Win64/x86_64 target, there is not defined FPC_HAS_TYPE_EXTENDED, so I get "truncated values"
 " -922337203685477.0000"
Oposed to Win32/i386, where I get
 "-922337203685477.5807"

And secondly why is MinCurrency "-922337203685477.5807" and not "-922337203685477.5808"
(see mentioned bug report)

-Laco.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to