blob: 6ea5c8bbcdf0f48dd693acc7513cfe59aca3d8f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
{$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.
|