mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-03 03:53:41 +02:00
26 lines
458 B
ObjectPascal
26 lines
458 B
ObjectPascal
program Example110;
|
|
|
|
{ Program to demonstrate the Real2Double function. }
|
|
|
|
Var
|
|
i : integer;
|
|
R : Real48;
|
|
D : Double;
|
|
E : Extended;
|
|
F : File of Real48;
|
|
|
|
begin
|
|
Assign(F,'reals.dat');
|
|
Reset(f);
|
|
For I:=1 to 10 do
|
|
begin
|
|
Read(F,R);
|
|
D:=Real2Double(R);
|
|
Writeln('Real ',i,' : ',D);
|
|
D:=R;
|
|
Writeln('Real (direct to double) ',i,' : ',D);
|
|
E:=R;
|
|
Writeln('Real (direct to Extended) ',i,' : ',E);
|
|
end;
|
|
Close(f);
|
|
end. |