home *** CD-ROM | disk | FTP | other *** search
- {$M $1000,$1000,$1000}
- {$R+} { Range checking on }
- {$B-} { Boolean complete evaluation off }
- {$S-} { Stack checking off }
- {$I-} { I/O checking off }
- {$V-} { Relaxed variable checking }
- {$N+} { Numeric coprocessor }
- {$E+} { Numeric coprocessor emulation }
-
- Program test;
-
- Uses Crt, Dos, RealStr;
-
- (*****************************************************************************)
- (************************ Main program *******************************)
- var
- AReal : real;
- ASingle : single;
- i : word;
- begin
- repeat
- writeln;
- write ('Enter a Number ');
- readln (AReal);
- if AReal = 0 then exit;
- ASingle := AReal;
- writeln;
- writeln (' Single Real');
- writeln (' ---------------------- ----------------------');
- write (' write () =');
- GoToXY (16, WhereY); write (ASingle);
- GoToXY (42, WhereY); writeln (AReal);
-
- for i := 15 downto 1 do
- begin
- write (' ',i);
- GoToXY (7, WhereY);
- write ('Digits =');
- GoToXY (16, WhereY);
- write (RealToString (i, ASingle));
- GoToXY (42, WhereY);
- writeln (RealToString (i, AReal));
- end;
-
- writeln;
- writeln;
- until false; { Exit loop by entering 0 or non-numeric value at readln }
- end.
-