C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C**************************
C**     LRL_GETHKL       **
C**************************
C
C
      SUBROUTINE LRL_GETHKL (HKL, IH, IK, IL)
C
      INCLUDE 'implicit_none.finc'
C
C Purpose: Unpack packed hkl or nodal hkl as stored in reflection list
C
C Author:  John W. Campbell, July 1993
C
C **** Service Routine Only ****
C
C Arguments:
C
      INTEGER HKL
      INTEGER IH
      INTEGER IK
      INTEGER IL
C
C HKL     (R)   Packed indices
C IH      (W)   Returns 'h' index
C IK      (W)   Returns 'k' index
C IL      (W)   Returns 'l' index
C
C
C====== LOCALS:
C
      INTEGER I
      INTEGER NTWO20
      INTEGER NTWO10

C     INTEGER I           !Temp. integer value
C     INTEGER NTWO20      !2**20
C     INTEGER NTWO10      !2**10

      DATA NTWO20/1048576/
      DATA NTWO10/1024/
C
C-------------------------------------------------------------------------------
C
      I = HKL
      IH = I/NTWO20
      I = I - NTWO20*IH
      IH = IH - 512
      IK = I/NTWO10
      IL = I - NTWO10*IK - 512
      IK = IK - 512
      RETURN
      END
