FloatToStrF() returns wrong result in comparision with dcc compiler (K3/D7)
Original Reporter info from Mantis: zeljko@holobit.net @zeljan1
-
Reporter name: Zeljan Rikalo
Original Reporter info from Mantis: zeljko@holobit.net @zeljan1
- Reporter name: Zeljan Rikalo
Description:
Don't know is this fpc or dcc bug, but dcc solution is preferable (0.00) since it look
strange when we have -0.00 as result in user application.
eg. :
var
fl: Double;
s: String;
begin
fl := -0.00;
s := FloatToStrF(fl, ffFixed, 12, 2);
writeln('s=',s);
end;
then "s" is:
dcc fpc
0.00 -0.00
Example attached.
Mantis conversion info:
- Mantis ID: 13722
- Version: 2.2.5
- Fixed in version: 2.6.0
- Fixed in revision: 15945 (#f7b26871)
- Monitored by: » fred1976 (Frederic MALEVAL), » crossbuilder (Burkhard Carstens), » @andrea.mauri (Andrea Mauri), » Vincent (Vincent Snijders), » alank@shermanloan.com (Alan Krause)