init_hash_table Subroutine

public pure subroutine init_hash_table(hash_table)

Arguments

Type IntentOptional Attributes Name
type(ll_node), intent(inout), pointer :: hash_table(:)

Contents

Source Code


Source Code

    pure subroutine init_hash_table(hash_table)

        ! Take a just-allocated hash table, which must be empty, and
        ! initialise it by nullifying all pointers and setting all entries to
        ! zero.

        type(ll_node), pointer, intent(inout) :: hash_table(:)
        integer :: i

        do i = 1, size(hash_table)
            hash_table(i)%ind = 0
            nullify (hash_table(i)%next)
        end do

    end subroutine init_hash_table