anchor.diff:                                                !  |  14  |  87  |
                                                 !  |  18  |  85  |
                                                 !  |  42  |  78  |
  -  CALL HASHLIST_SORT(HL,ASC)                  !  |  44  |  72  |        
  -  CALL HASHLIST_SORT(HL,DESC,.FALSE.)         !  |  60  |  64  |
  +  CALL HASH_SORT(H,ASC)                       !  |  44  |  72  |        
  +  CALL HASH_SORT(H,DESC,.FALSE.)              !  |  60  |  64  |
     DO I = 1, 10                                !  |  64  |  60  |
       WRITE(6,'(2I8)') ASC(I),DESC(I)           !  |  72  |  44  |
     END DO                                      !  |  78  |  42  |
  
positive.code:   END IF
    I = 1
    C = 0
    CALL HASHLIST_SORTED(HL,ARRAY,I,C,ASC)
  END SUBROUTINE HASHLIST_SORT
  ! ---------------------------------------------------------------------------------------------------------------------------------+
  RECURSIVE SUBROUTINE HASHLIST_SORTED(HL,ARRAY,I,C,ASCENDING)
  TYPE(HASHLIST), INTENT(IN)    :: HL
  INTEGER(KIND=4),INTENT(INOUT) :: ARRAY(:)
  INTEGER(KIND=4),INTENT(IN)    :: I
  INTEGER(KIND=4),INTENT(INOUT) :: C
  LOGICAL(KIND=4),INTENT(IN)    :: ASCENDING
  IF (ASCENDING) THEN
    IF (HL%HASH(2,I).NE.0) CALL HASHLIST_SORTED(HL,ARRAY,HL%HASH(2,I),C,ASCENDING)
    IF (C.GT.SIZE(ARRAY)) RETURN
    C = C + 1
    ARRAY(C) = HL%HASH(1,I)
    IF (HL%HASH(3,I).NE.0) CALL HASHLIST_SORTED(HL,ARRAY,HL%HASH(3,I),C,ASCENDING)
  ELSE
    IF (HL%HASH(3,I).NE.0) CALL HASHLIST_SORTED(HL,ARRAY,HL%HASH(3,I),C,ASCENDING)
    IF (C.GT.SIZE(ARRAY)) RETURN
    C = C + 1
    ARRAY(C) = HL%HASH(1,I)
    IF (HL%HASH(2,I).NE.0) CALL HASHLIST_SORTED(HL,ARRAY,HL%HASH(2,I),C,ASCENDING)
  END IF
  END SUBROUTINE HASHLIST_SORTED
  ! ---------------------------------------------------------------------------------------------------------------------------------+
  END MODULE MODHASHLIST
  ! ---------------------------------------------------------------------------------------------------------------------------------+
  PROGRAM HASHTEST
  USE MODHASHCODE
  USE MODHASHLIST
  IMPLICIT NONE
  INTEGER(KIND=4)           :: RES,I,J
  INTEGER(KIND=1),PARAMETER :: IDIV = 11
  
negative.code: CHARACTER(LEN=16)         :: STR16 = '   Some String  '
  CHARACTER(LEN=20)         :: STR20 = '1 34 tmp xyz  t '
  CHARACTER(LEN=24)         :: STR24 = '  ABCDEFGHIJKLMNO       '
  TYPE(HASH)                :: H
  INTEGER(KIND=4)           :: ASC(10),DESC(10)
    WRITE(6,'("0*** HASHTEST - INTEGER ********")')
    WRITE(6,'("     HASH VALUE OF INT1  ",I20,    " = ",I11)')  INT1, HASHCODE( INT1)
  