blob: 9b7db3770a6c7fbb7491d9cb5413ca1ed8c89e05 (
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
|
program testformatfloat;
uses SysUtils;
const
val_format: string = '0.0000E+000';
var
input: extended;
begin
decimalseparator:='.';
input:=1.05e2;
if (formatfloat(val_format,input)<>'1.0500E+002') then
begin
writeln(formatfloat(val_format,input));
halt(1);
end;
input:=1.06e2;
if (formatfloat(val_format,input)<>'1.0600E+002') then
begin
writeln(formatfloat(val_format,input));
halt(2);
end;
end.
|