C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C**************************
C**     LDM_FVAL         **
C**************************
C
C
      INTEGER FUNCTION LDM_FVAL (VALSTR, FP, ND, IERR, ERRSTR)
C
      INCLUDE 'implicit_none.finc'
C
C Purpose: Get real LDM parameter value from string
C
C ***** 'LDM' SERVICE ROUTINE ONLY *****
C
C Author:  John W. Campbell, June 1993
C
C Return:   0 = OK
C           1 = Syntax error in number
C
C Arguments:
C
      CHARACTER*(*) VALSTR
      REAL FP
      INTEGER ND
      INTEGER IERR
      CHARACTER*(*) ERRSTR
C
C VALSTR    (R)  Character string to be interpreted
C FP        (W)  Returned floating point number (0.0 if syntax error)
C ND        (W)  No. of decimal places (-ve if E format input)
C IERR      (W)  Error flag = 0 OK
C                           = 1 Syntax error in number
C           (W)  Error string (max. 80 chars)
C
C====== Parameter statements
C 

C
C====== GLOBALS:
C

C
C====== FUNCTION TYPES:
C
      INTEGER LDM_INTFP
C
C====== LOCALS:
C
      INTEGER K
      INTEGER IV
C
C-------------------------------------------------------------------------------
C
      IERR = 0
      LDM_FVAL = 0
      ERRSTR = ' '
      K = LDM_INTFP (VALSTR, FP, IV, ND)
      IF (K.EQ.0) THEN
         IERR = 1
         ERRSTR = 'Invalid syntax for floating point number'
         LDM_FVAL = 1
      END IF
      RETURN
      END
