DEFINITION MODULE Real2Fil; (* Copyright (c) 1987, 1989 - Coronado Enterprises *) FROM FileSystem IMPORT File; EXPORT QUALIFIED WriteLnFile, WriteStringFile, WriteCardFile, WriteIntFile, WriteOctFile, WriteHexFile, WriteRealFile; (* These routines are used to output formatted data to a file. *) (* They are used much like the standard output procedures that *) (* are available in the module "InOut". The only real differ- *) (* ence is in the REAL output procedure which allows inputting *) (* the total field size, and the number of digits after the *) (* decimal point. *) PROCEDURE WriteLnFile(VAR FileName : File); (* Writes a return/linefeed to the file. *) PROCEDURE WriteStringFile(VAR FileName : File; String : ARRAY OF CHAR); (* Writes the string to the file. *) PROCEDURE WriteCardFile(VAR FileName : File; DataOut : CARDINAL; FieldSize : CARDINAL); (* Writes a CARDINAL to the file. *) PROCEDURE WriteIntFile(VAR FileName : File; DataOut : INTEGER; FieldSize : CARDINAL); (* Writes an INTEGER to the file. *) PROCEDURE WriteOctFile(VAR FileName : File; DataOut : CARDINAL; FieldSize : CARDINAL); (* Writes a CARDINAL to the file in an octal format *) PROCEDURE WriteHexFile(VAR FileName : File; DataOut : CARDINAL; FieldSize : CARDINAL); (* Writes a CARDINAL to the file in a hex format. *) PROCEDURE WriteRealFile(VAR FileName : File; DataOut : REAL; FieldSize : CARDINAL; Digits : CARDINAL); (* Writes a REAL to the file with "FieldSize" total *) (* columns and "Digits" significant places after *) (* the decimal point. *) END Real2Fil.