Site Menu Project Specification Implementation Recommendations Reference Needs Updating Work in Progress Wastebasket Wiki Manual |
IO Module WORDSpec.IOModuleWORD HistoryHide minor edits - Show changes to output 2010-05-24 12:41
by -
Changed lines 3-4 from:
(* to:
(* I/O Module for Type WORD *) Changed lines 8-16 from:
(* wordValue : PROCEDURE Read( infile : File; VAR n : BYTE ); (* Reads to:
(* EBNF of the textual representation of WORD values: wordValue : digitGroup digitGroup ( groupSeparator? digitGroup digitGroup )* ; digitGroup : base16Digit base16Digit ; base16Digit : "0" .. "9" | "A" .. "F" ; groupSeparator : " " | "." ; static semantics: WORD values are always left padded with zeroes to the length required to represent the maximum value of type WORD. *) PROCEDURE Read ( infile : File; VAR w : WORD ); (* Reads the textual representation of a WORD value from stream infile Changed lines 24-33 from:
- any remaining characters that are part of the PROCEDURE Write( outfile : File; n : BYTE ); (* Writes the textual representation PROCEDURE WriteF( outfile (* Writes a formatted textual representation to:
- any remaining characters that are part of the value being read are removed from infile - the textual representation of the value read is assigned to w - the file status is set to any of: success, outOfRange, wrongFormat, endOfLine, or endOfInput. This procedure is substituted for invocations of READ with a WORD argument. *) PROCEDURE Write ( outfile : File; w : WORD ); (* Writes the value of WORD w in standard format to stream outfile. This procedure is substituted for invocations of WRITE with a WORD argument.*) PROCEDURE WriteF ( outfile : File; CONST fmtStr : ARRAY OF CHAR; items : VARIADIC OF WORD ); (* Writes a formatted textual representation of one or more WORD values to output stream outfile. The output format is determined by fmtStr. This procedure is substituted for invocations of WRITEF with one or more WORD arguments. *) |