mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 20:59:42 +02:00
+ Added real2double example
This commit is contained in:
parent
7db1cc1eff
commit
b1a5ae6670
@ -40,7 +40,7 @@ OBJECTS=ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 ex10 ex11 ex12 ex13 ex14 \
|
||||
ex67 ex68 ex69 ex70 ex71 ex72 ex73 ex74 ex75 ex76 ex77 ex78 ex79 \
|
||||
ex80 ex81 ex82 ex83 ex84 ex85 ex86 ex87 ex88 ex89 \
|
||||
ex90 ex91 ex92 ex93 ex94 ex95 ex96 ex97 ex98 ex99 ex100 ex101 ex102\
|
||||
ex103 ex104 ex105 ex106 ex107 ex108 ex109
|
||||
ex103 ex104 ex105 ex106 ex107 ex108 ex109 ex110
|
||||
|
||||
TEXOBJECTS=$(addsuffix .tex, $(OBJECTS))
|
||||
|
||||
|
@ -112,3 +112,4 @@ ex106.pp contains an example of the IndexWord function.
|
||||
ex107.pp contains an example of the IndexDWord function.
|
||||
ex108.pp contains an example of the IndexChar function.
|
||||
ex109.pp contains an example of the MoveChar0 function.
|
||||
ex110.pp contains an example of the Real2Double function.
|
||||
|
26
docs/refex/ex110.pp
Normal file
26
docs/refex/ex110.pp
Normal file
@ -0,0 +1,26 @@
|
||||
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.
|
BIN
docs/refex/reals.dat
Normal file
BIN
docs/refex/reals.dat
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user