C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C****************************
C**     LDM_GET_LATT       **
C****************************
C
C
CD-Doc:
C LATTice          SUBROUTINE LDM_GET_LATT (VALSTR, IVAL, IFLAG)
CD-end
      SUBROUTINE LDM_GET_LATT (VALSTR, IVAL, IFLAG)
C
      INCLUDE 'implicit_none.finc'
C
C Purpose: Get value of string/code parameter LATTICE
C
C Author:  John W. Campbell, June 1993
C
C Arguments:
C
      CHARACTER*(*) VALSTR
      INTEGER IVAL
      INTEGER IFLAG

C  VALSTR    (W)   Value for the parameter as a string
C                  P, A, B, C, I, F or R  (1 character)
C  IVAL      (W)   Lattice type 1-7, 1=P...7=R
C  IFLAG     (W)   Flag = -1 undefined value
C                       =  0 default value
C                       =  1 value set explicitly
C                       =  2 value set globally
C
C====== GLOBALS:
C
      INCLUDE 'ldm_data.finc'
      EXTERNAL LDM_BDAT
C
C====== LOCALS:
C
      CHARACTER*1 STR(7)

      DATA STR /'P','A','B','C','I','F','R' /
C
C-------------------------------------------------------------------------------
C
      IVAL = LATT
      VALSTR = STR(IVAL)
      IFLAG = IS_LATT
      RETURN
      END
