home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boston 2
/
boston-2.iso
/
DOS
/
PROGRAM
/
MODULA
/
FSTCOMPI
/
REALINOU.DEF
< prev
next >
Wrap
Text File
|
1993-12-01
|
834b
|
34 lines
DEFINITION MODULE RealInOut;
(* (C) Copyright 1987,1988 Fitted Software Tools. All rights reserved. *)
(*
This module is an extension of InOut and provides routines
for reading and writing REAL numbers.
This module does its I/O thru InOut.
*)
VAR Done :BOOLEAN;
PROCEDURE ReadReal( VAR x :REAL );
(*
reads a string.
the string is then converted to a REAL which is returned in x.
a real in the format defined for Modula-2 REAL literals is expected
Done is set to TRUE if a valid REAL number is read.
*)
PROCEDURE WriteReal( x: REAL; n: CARDINAL );
(*
x is written in scientific notation, right justified in a field
of at least n characters.
*)
PROCEDURE ReadLongReal( VAR x :LONGREAL );
PROCEDURE WriteLongReal( x: LONGREAL; n: CARDINAL );
END RealInOut.