Site Menu Project Specification Implementation Recommendations Reference Needs Updating Work in Progress Wastebasket Wiki Manual |
IO Module BOOLEANSpec.IOModuleBOOLEAN HistoryHide minor edits - Show changes to output 2010-05-24 12:43
by -
Changed lines 3-4 from:
(* to:
(* I/O Module for Type BOOLEAN *) Changed line 7 from:
(* to:
(* EBNF of the textual representation of BOOLEAN values: Changed lines 9-23 from:
trueFalseFormat : yesNoFormat : PROCEDURE Read (* from the first letter of the string obtained to b. If the first letter is "Y", "y", "T", or "t", PROCEDURE Write( outfile (* Writes the value of b in true-false format to output stream outfile. *) PROCEDURE WriteF( outfile : File; fmtStr : ARRAY OF CHAR; items (* Writes to:
trueFalseFormat : "TRUE" | "FALSE" ; yesNoFormat : "YES" | "NO" ; *) PROCEDURE Read ( infile : File; VAR b : BOOLEAN ); (* Reads the textual representation of a BOOLEAN value from stream infile - any leading whitespace is skipped - 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 b - the file status is set to any of: success, outOfRange, wrongFormat, endOfLine, or endOfInput. This procedure is substituted for invocations of READ with a BOOLEAN argument.*) PROCEDURE Write ( outfile : File; b : BOOLEAN ); (* Writes the textual representation of BOOLEAN b to stream outfile. This procedure is substituted for invocations of WRITE with a BOOLEAN argument.*) PROCEDURE WriteF ( outfile : File; CONST fmtStr : ARRAY OF CHAR; items : VARIADIC OF BOOLEAN ); (* Writes a formatted textual representation of one or more BOOLEAN values to output stream outfile. The output format is determined by fmtStr. This procedure is substituted for invocations of WRITEF with one or more BOOLEAN arguments. *) |