mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 15:28:08 +02:00

before it because the value is too small, regardless of what the format pattern sepcifies (patch by Bart Broersma, mantis #13076) git-svn-id: trunk@23095 -
29 lines
419 B
ObjectPascal
29 lines
419 B
ObjectPascal
{$ifdef fpc}
|
|
{$mode objfpc}
|
|
{$endif}
|
|
program tw12385;
|
|
|
|
uses
|
|
SysUtils;
|
|
|
|
var
|
|
s: string;
|
|
cr: Extended;
|
|
|
|
Procedure TestIt(CR : Extended; Fmt,Expected : String);
|
|
|
|
begin
|
|
S:=FormatFloat(Fmt,cr);
|
|
If S<>Expected then
|
|
begin
|
|
Writeln('"',S,'"<>"',Expected,'" (latter is correct)');
|
|
Halt(1);
|
|
end;
|
|
end;
|
|
|
|
begin
|
|
DecimalSeparator:='.';
|
|
ThousandSeparator:=',';
|
|
TestIt(-10,'###,###,##0.00','-10.00');
|
|
end.
|