# LRealConv

The regular expression for a signed fixed-point real number is ``[+-]?\d+(\.\d* )?`'. For the optional exponent part, it is ``E[+-]?\d+`'.

### Import List

        ConvTypes

Type Summary
ConvResults = ConvResults One of strAllRight, strOutOfRange, strWrongFormat, or strEmpty.

Procedure Summary
FormatReal(ARRAY OF CHAR): ConvResults
LengthEngReal(LONGREAL, INTEGER): INTEGER
LengthFixedReal(LONGREAL, INTEGER): INTEGER
LengthFloatReal(LONGREAL, INTEGER): INTEGER
ScanReal(CHAR, VAR ScanClass, VAR ScanState)
ValueReal(ARRAY OF CHAR): LONGREAL

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

### ConvResults

    TYPE ConvResults = ConvResults

> One of strAllRight, strOutOfRange, strWrongFormat, or strEmpty.

Procedure Detail

### FormatReal

    PROCEDURE FormatReal(str: ARRAY OF CHAR): ConvResults

### LengthEngReal

    PROCEDURE LengthEngReal(real: LONGREAL;
                            sigFigs: INTEGER): INTEGER

### LengthFixedReal

    PROCEDURE LengthFixedReal(real: LONGREAL;
                              place: INTEGER): INTEGER

### LengthFloatReal

    PROCEDURE LengthFloatReal(real: LONGREAL;
                              sigFigs: INTEGER): INTEGER

### ScanReal

    PROCEDURE ScanReal(inputCh: CHAR;
                       VAR chClass: ScanClass;
                       VAR nextState: ScanState)

### ValueReal

    PROCEDURE ValueReal(str: ARRAY OF CHAR): LONGREAL

Constant Detail

### strAllRight

    CONST strAllRight

> The string format is correct for the corresponding conversion.

### strEmpty

    CONST strEmpty

> The given string is empty.

### strOutOfRange

    CONST strOutOfRange

> The string is well-formed but the value cannot be represented.

### strWrongFormat

    CONST strWrongFormat

> The string is in the wrong format for the conversion.