Site Menu Project Specification Implementation Recommendations Reference Needs Updating Work in Progress Wastebasket Wiki Manual |
IO Module REALSpec.IOModuleREAL HistoryHide minor edits - Show changes to output 2010-05-24 12:51
by -
Changed lines 3-4 from:
(* to:
(* I/O Module for Type REAL *) Changed lines 7-9 from:
(* to:
(* EBNF of the textual representation of REAL values: realValue : unpaddedRealValue | leftPaddedRealValue | rightPaddedRealValue ; Changed lines 14-15 from:
otherFormats : sign? fillChar* ( fixedFmtNumeral | engFmtNumeral | expFmtNumeral ) suffix? ; to:
otherFormats : sign? fillChar* ( fixedFmtNumeral | engFmtNumeral | expFmtNumeral ) suffix? ; Changed lines 21-27 from:
sign : negativeSign : fillChar : integralPart : to:
sign : " " | "+" | "-" ; negativeSign : "-" ; fillChar : " " | "*" | "0" ; integralPart : decimalDigit decimalDigit? decimalDigit? ( separator? digitGroup )* ; engIntegralPart : ( ( ( decimalDigit separator? )? decimalDigit )? decimalDigit )? decimalDigit ; fractionalPart : ( decimalDigit ( decimalDigit ( decimalDigit separator )? )? )* decimalDigit ; exponent : "E" ( "+" | "-" ) decimalDigit decimalDigit+ ; Changed lines 34-35 from:
decimalPoint : separator : to:
decimalPoint : "." | "," ; separator : " " | "." | "," ; Changed lines 37-41 from:
decimalDigit : suffix : ' Static semantics to:
decimalDigit : "0" .. "9" ; suffix : "'" character* "'" ; Static semantics: Changed lines 43-47 from:
the PROCEDURE Read (* Reads the textual representation of a REAL value to:
the value represented by engExponent must always be divisible by three. *) PROCEDURE Read ( infile : File; VAR r : REAL ); (* Reads the textual representation of a REAL value from stream infile Changed lines 48-57 from:
- any remaining characters that are part of the PROCEDURE Write( outfile : File; r : REAL ); (* 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 r - the file status is set to any of: success, outOfRange, wrongFormat, endOfLine, or endOfInput. This procedure is substituted for invocations of READ with a REAL argument. *) PROCEDURE Write ( outfile : File; r : REAL ); (* Writes the value of REAL r in simple format to stream outfile. This procedure is substituted for invocations of WRITE with a REAL argument.*) PROCEDURE WriteF ( outfile : File; CONST fmtStr : ARRAY OF CHAR; items : VARIADIC OF REAL ); (* Writes a formatted textual representation of one or more REAL values to output stream outfile. The output format is determined by fmtStr. This procedure is substituted for invocations of WRITEF with one or more REAL arguments. *) |