Site Menu Project Specification Implementation Recommendations Reference Needs Updating Work in Progress Wastebasket Wiki Manual |
IO Module CHARSpec.IOModuleCHAR HistoryHide minor edits - Show changes to output 2010-05-24 12:44
by -
Changed lines 3-4 from:
(* to:
(* I/O Module for Type CHAR *) Changed lines 7-17 from:
PROCEDURE Read (* assigns the corresponding value to ch. The file status of infile is set accordingly PROCEDURE Write( outfile : File; ch : CHAR ); (* Writes character ch PROCEDURE WriteF( outfile : File; fmtStr : ARRAY OF CHAR; items : CARDINAL; VARIADIC v[items] OF ch : CHAR ); (* Writes a formatted textual representation of one or more of parameter items is calculated and inserted automatically. The output format is determined by fmtStr to:
PROCEDURE Read ( infile : File; VAR ch : CHAR ); (* Reads a CHAR value from stream infile - any leading whitespace is skipped - the character being read is removed from infile - the code point of the character value read is assigned to ch - the file status is set to any of: success, outOfRange, wrongFormat, endOfLine, or endOfInput. This procedure is substituted for invocations of READ with a CHAR argument. *) PROCEDURE Write ( outfile : File; ch : CHAR ); (* Writes the textual representation of CHAR ch to stream outfile. This procedure is substituted for invocations of WRITE with a CHAR argument.*) PROCEDURE WriteF ( outfile : File; CONST fmtStr : ARRAY OF CHAR; items : VARIADIC OF CHAR ); (* Writes a formatted textual representation of one or more CHAR values to output stream outfile. The output format is determined by fmtStr. This procedure is substituted for invocations of WRITEF with one or more CHAR arguments. *) |