[fpc-pascal] Currency and ABS(-674.59)

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Mar 6 15:30:32 CET 2012

On 06 Mar 2012, at 14:13, Ludo Brands wrote:

> There is also a lot of code in the rtl and fcl-db that supposes  
> currency =
> double. Fe.
> Function CurrToStr(Value: Currency; Const FormatSettings:  
> TFormatSettings):
> string;
> begin
>  Result:=FloatToStrF(Value,ffGeneral,-1,0,FormatSettings);
> end;

FloatToStrF() is overloaded for currency. It's normal that currency<- 
 >string conversions are overloaded, since it's a separate type with  
separate formatting rules/restrictions. That is unrelated to the  
internal representation.

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

More information about the fpc-pascal mailing list