anchor.diff:  SUBROUTINE BTREE_RESIZE(BT, CAPACITY)
   TYPE(BTREE),INTENT(INOUT)   :: BT                        ! Hash to be resized
   INTEGER(KIND=4),INTENT(IN)  :: CAPACITY                  ! Capacity to which to resize BTREE
  -INTEGER(KIND=4),ALLOCATABLE :: TEMP(:,:)                 ! Temporary storage array for existing data
  -INTEGER(KIND=4)             :: OLDCAPACITY,I,J,IERR      ! Temp variables, error status, and counters
  +TYPE(TREENODE),ALLOCATABLE  :: TEMP(:)                   ! Temporary storage array for existing data
  +INTEGER(KIND=4)             :: OLDCAPACITY,I,IERR        ! Temp variables, error status, and counters
     IF (ALLOCATED(BT%TREE)) THEN
  -    OLDCAPACITY = SIZE(BT%TREE,2)
  -    ALLOCATE(TEMP(3,OLDCAPACITY),STAT=IERR)
  +    OLDCAPACITY = SIZE(BT%TREE)
  +    ALLOCATE(TEMP(OLDCAPACITY),STAT=IERR)
       IF (IERR.NE.0) THEN
         WRITE(0,'(A)') '0*** BTREE_RESIZE: UNABLE TO ALLOCATE TEMPORARY MEMORY FOR BTREE.'
         STOP
       END IF
       TEMP = BT%TREE
       CALL BTREE_ALLOCATE(BT, CAPACITY)
  -    DO J = 1, MIN(OLDCAPACITY,CAPACITY)
  -      DO I = 1,3
  -        BT%TREE(I,J) = TEMP(I,J)
  -      END DO
  +    DO I = 1, MIN(OLDCAPACITY,CAPACITY)
  +        BT%TREE(I) = TEMP(I)
       END DO
       DEALLOCATE(TEMP,STAT=IERR)
       IF (IERR.NE.0) THEN
  
positive.code: ! ---------------------------------------------------------------------------------------------------------------------------------+
  IMPLICIT NONE
  PRIVATE
  PUBLIC :: BTREE,BTREE_ADD,BTREE_SORT,BTREE_SETBLOCKSIZE,BTREE_INIT
  TYPE BTREE                                                      ! BTREE data type
    INTEGER(KIND=4)             :: CAPACITY                       ! Hash maximum capacity
    INTEGER(KIND=4)             :: COUNT                          ! Current count of items stored in hash.
    INTEGER(KIND=4),ALLOCATABLE :: TREE(:,:)                      ! Hash Data dimensioned (1:3,1:CAPACITY)
  END TYPE BTREE
  INTEGER(KIND=4),PARAMETER     :: DEFAULT_BLOCKSIZE = 4
  INTEGER(KIND=4)               :: BLOCKSIZE = DEFAULT_BLOCKSIZE  ! Block size for resizing hash
  ! ---------------------------------------------------------------------------------------------------------------------------------+
                                                             CONTAINS
  
negative.code:   RES = BTREE_ADD(BT,18)                      !  10        |  18  |       |  0   |   0  |
                                                !            +------+       +------+------+
  
  
    WRITE(6,'("CAPACITY = ",I4,", COUNT = ",I4)') SIZE(BT%TREE), BT%COUNT
    DO I = 1, BT%COUNT
      WRITE(6,'(3I8)') BT%TREE(I)
    END DO
  
                                                !  +------+------+
  