| SUMMARY: MODULE | CLASS | TYPE | PROC | VAR | CONST | DETAIL: TYPE | PROC | VAR | CONST |
The regular expression for a signed fixed-point real number is `[+-]?\d+(\.\d* )?'. For the optional exponent part, it is `E[+-]?\d+'.
ConvTypes
| Type Summary | |
| ConvResults = ConvResults One of strAllRight, strOutOfRange, strWrongFormat, or strEmpty. | |
| Procedure Summary | |
| FormatReal(ARRAY OF CHAR): ConvResults | |
| LengthEngReal(REAL, INTEGER): INTEGER | |
| LengthFixedReal(REAL, INTEGER): INTEGER | |
| LengthFloatReal(REAL, INTEGER): INTEGER | |
| ScanReal(CHAR, VAR ScanClass, VAR ScanState) | |
| ValueReal(ARRAY OF CHAR): REAL | |
| Constant Summary | |
| strAllRight The string format is correct for the corresponding conversion. | |
| strEmpty The given string is empty. | |
| strOutOfRange The string is well-formed but the value cannot be represented. | |
| strWrongFormat The string is in the wrong format for the conversion. | |
| Type Detail |
TYPE ConvResults = ConvResults
One of strAllRight, strOutOfRange, strWrongFormat, or strEmpty.
| Procedure Detail |
PROCEDURE FormatReal(str: ARRAY OF CHAR): ConvResults
PROCEDURE LengthEngReal(real: REAL;
sigFigs: INTEGER): INTEGERPROCEDURE LengthFixedReal(real: REAL;
place: INTEGER): INTEGERPROCEDURE LengthFloatReal(real: REAL;
sigFigs: INTEGER): INTEGERPROCEDURE ScanReal(inputCh: CHAR;
VAR chClass: ScanClass;
VAR nextState: ScanState)PROCEDURE ValueReal(str: ARRAY OF CHAR): REAL
| Constant Detail |
CONST strAllRight
The string format is correct for the corresponding conversion.
CONST strEmpty
The given string is empty.
CONST strOutOfRange
The string is well-formed but the value cannot be represented.
CONST strWrongFormat
The string is in the wrong format for the conversion.