[Lazarus] format problem

Michael Van Canneyt michael at freepascal.org
Thu Mar 11 10:00:32 CET 2010



On Thu, 11 Mar 2010, Andrea Mauri wrote:

> I have problems with format function.
> If I set:
>  f:= -0.0002;
> and then I do:
>  Edit1.Text:= FormatFloat('0.000', f);
>  Edit2.Text:= format('%.0f', [f]);
>  Edit3.Text:= format('%.3f', [f]);
> The results I obtain are:
> -0.000
> -0
> -0.000
> While they should be:
> 0.000
> 0
> 0.000
> I have to report a bug to mantis fpc-rtl?

Yes, although I think there is still a related bug open in FPC/rtl. 
Please search first.

Michael.




More information about the Lazarus mailing list