C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C****************************
C**     LDM_GET_SPOTD      **
C****************************
C
C
CD-Doc:
C SPOT_Delta       SUBROUTINE LDM_GET_SPOTD (IPACK, IPLATE, VALUE, IFLAG, 
C                 +                          ND, IERR, ERRSTR)
CD-end
      SUBROUTINE LDM_GET_SPOTD (IPACK, IPLATE, VALUE, IFLAG, ND, 
     +                       IERR, ERRSTR)
C
      INCLUDE 'implicit_none.finc'
C
C Purpose: Get value of plate dependent real parameter SPOT_DELTA
C
C Author:  John W. Campbell, June 1993
C
C Arguments:
C
      INTEGER IPACK
      INTEGER IPLATE
      REAL VALUE
      INTEGER IFLAG
      INTEGER ND
      INTEGER IERR
      CHARACTER*(*) ERRSTR

C  IPACK     (R)   Pack number (explicit)
C  IPLATE    (R)   Plate number (explicit)
C  VALUE     (W)   Returns spot separation delta in mm.
C  IFLAG     (W)   Flag = -1 undefined value
C                       =  0 default value
C                       =  1 value set explicitly
C                       =  2 value set globally
C  ND        (W)   Number of decimal places for print (- if E format)
C  IERR      (W)   Error flag = 0 OK
C                             =-1 Invalid pack number
C                             =-2 Invalid plate number
C  ERRSTR    (W)   Error string if error found
C
C====== GLOBALS:
C
      INCLUDE 'ldm_data.finc'
      EXTERNAL LDM_BDAT
C
C====== LOCALS:
C

C
C-------------------------------------------------------------------------------
C
      CALL LDM_CHK_GPL (IPACK, IPLATE, IERR, ERRSTR)
      IF (IERR.NE.0) RETURN
      VALUE = SPOTD(IPACK,IPLATE)
      IFLAG = IS_SPOTD(IPACK,IPLATE)
      ND = ND_SPOTD(IPACK,IPLATE)
      IF (ND.EQ.-1000) ND = 3
      RETURN
      END
