@@ -10,19 +10,32 @@ const Inf=1/0;
var
s : string;
error : boolean;
+ s1, s2, s3 : string;
begin
+ if sizeof(extended) > 8 then
+ begin
+ s1 := ' +Inf';
+ s2 := ' Nan';
+ s3 := ' -Inf';
+ end
+ else
+ end;
error:=false;
str(Inf,s);
writeln('Inf: "',s,'"');
- if s<>' +Inf' then
+ if s<>s1 then
error:=true;
str(NaN,s);
writeln('Nan: "',s,'"');
- if s<>' Nan' then
+ if s<>s2 then
str(MinusInf,s);
writeln('MinusInf: "',s,'"');
- if s<>' -Inf' then
+ if s<>s3 then
if error then
@@ -4,6 +4,7 @@
program pbug;
var d:double;
s:string;
+ s1:string;
d:=5168568.5;
str(d:10,s);
@@ -19,7 +20,11 @@ begin
halt(1);
end;
str(d,s);
- if s<>' 5.168568500000000E+006' then
+ s1 := ' 5.168568500000000E+006'
+ s1 := ' 5.16856850000000E+006';
writeln(s);