anchor.diff:   9999 STOP 'SCAN ERROR'
         END SUBROUTINE SCNERR
   !------------------------------------------------------------------------------+
  -      SUBROUTINE PARSE(STR)
  +      SUBROUTINE PARSE(STR,TOKS,VAL)
         USE MOD_VARIABLES
         IMPLICIT NONE
  -      CHARACTER(LEN=*),INTENT(IN) :: STR ! Input string
  +!     -------------------------------------------------------------------------+
  +      CHARACTER(LEN=*),INTENT(IN)  :: STR  ! Input string
  +      TYPE(TYP_TOKLST),INTENT(IN)  :: TOKS ! INFIX token list (Queue)
  +      REAL(KIND=8),    INTENT(OUT) :: VAL
   !     -------------------------------------------------------------------------+
         CHARACTER(LEN=80)  :: BUFF    ! Character buffer for writing to STDOUT
         INTEGER(KIND=4)    :: I       ! Counter
  
positive.code:       INTEGER SZ
        PARAMETER (SZ=64)
        CHARACTER*(SZ) RAW
        DO 1001 WHILE (.TRUE.)
        READ(5,9001,END=8999)RAW
        CALL UCASE(RAW)
  
negative.code:         CALL SETPAIR(RAW)
          CYCLE
        END IF
        CALL FMTDP(EVALUATE(RAW),SVAL,8)
        WRITE(6,9101) SVAL
   1001 CONTINUE
   8999 GOTO 9999
   9001 FORMAT(A64)
   9101 FORMAT('0***      RESULT: ',A8)
   9999 STOP
        END PROGRAM EVAL
  !------------------------------------------------------------------------------+
  ! LCASE: Lower CASE.
  !------------------------------------------------------------------------------+
  ! STR - I/O - Character data to be converted to upper/lower case.
  !------------------------------------------------------------------------------+
  ! Converts character data to lower case.  Wraps CHGCASE
  ! The difference between the character values of lower and upper
  ! case.  In ASCII, A < a, in EBCDIC, A > a.  So, if this case is
  ! ASCII, DIFF will be a negative number, and converting from lower
  ! to upper will subtract the magnitude of the offset.
  !------------------------------------------------------------------------------+
        SUBROUTINE LCASE(STR)
        IMPLICIT NONE
        CHARACTER*(*) STR
        CHARACTER C
        INTEGER I,DIFF
        DIFF = ICHAR('A') - ICHAR('a')
        DO 1001 I = 1, LEN_TRIM(STR)
        C = STR(I:I)
        IF(C.ge.'A'.and.C.le.'Z') STR(I:I) = CHAR(ICHAR(C)-DIFF)
   1001 CONTINUE
        END SUBROUTINE LCASE
  !------------------------------------------------------------------------------+
  ! UCASE: Upper CASE.
  !------------------------------------------------------------------------------+
  ! STR - I/O - Character data to be converted to upper/lower case.
  !------------------------------------------------------------------------------+
  ! Converts character data to upper case.  Wraps CHGCASE
  !------------------------------------------------------------------------------+
        SUBROUTINE UCASE(STR)
        IMPLICIT NONE
        CHARACTER*(*) STR
        CHARACTER C
        INTEGER I,DIFF
        DIFF = ICHAR('A') - ICHAR('a')
        DO 1001 I = 1, LEN_TRIM(STR)
        C = STR(I:I)
        IF(C.ge.'a'.and.C.le.'z') STR(I:I) = CHAR(ICHAR(C)+DIFF)
   1001 CONTINUE
        END SUBROUTINE UCASE
  !------------------------------------------------------------------------------+
        SUBROUTINE FMTDP(VAL, BUFF, WD)
  !     Format a DOUBLE PRECISION value to fit in buffer with max precision.
  !     Error will result in writing '*' characters to the buffer.
  !     The format for real numbers is:
  !                               Fw.d
  !                               Ew.dEe
  !                               Gw.d
  !     W is the total width, D is the number of digits to the right of
  !     the floating point.  This subroutine starts with the total width,
  !     and figures out how much width is allowaded for D.
        IMPLICIT NONE
  !     -------------------------------------------------------------------------+
        REAL(KIND=8),    INTENT(IN)  :: VAL  ! Value to format
        CHARACTER(LEN=*),INTENT(OUT) :: BUFF ! Buffer in which to write value
        INTEGER(KIND=4), INTENT(IN)  :: WD   ! Desired field width
  !     -------------------------------------------------------------------------+
        INTEGER(KIND=4)   :: W      ! 'w' of Gw.d format descriptor
        INTEGER(KIND=4)   :: D      ! 'd' of Gw.d format descriptor
        INTEGER(KIND=4)   :: E      ! 'e' of Ew.dEe format descriptor
        INTEGER(KIND=4)   :: POW10  ! Reference to POW10 function
        INTEGER(KIND=4)   :: IOS    ! IOSTAT for read/write operations
        INTEGER(KIND=4)   :: FIOS   ! IOSTAT for reading FVAL from TBUF
        INTEGER(KIND=4)   :: EIOS   ! IOSTAT for reading EVAL from TBUF
        CHARACTER(LEN=16) :: FSTR   ! Fw.d format string
        CHARACTER(LEN=16) :: ESTR   ! Ew.dEe format string
        CHARACTER(LEN=32) :: TBUF   ! Temp buffer for writing real value
        REAL(KIND=4)      :: FVAL   ! Value read from buffer with Fw.d format
        REAL(KIND=4)      :: EVAL   ! Value read from buffer with Ew.d format
  !     -------------------------------------------------------------------------+
        FVAL = 0D0
        EVAL = 0D0
        W = MIN(LEN(BUFF), WD)
  