| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hashtbl_obj), | intent(inout) | :: | this |
Hashtable object |
||
| integer, | intent(in) | :: | key |
Key from key-val pair to add in hashtable |
||
| class(*), | intent(in) | :: | val |
Val from key-val pair to add in hashtable |
pure subroutine hashtbl_obj_Put(this,key,val) ! Adds a key-val pair to a hashtable implicit none class(hashtbl_obj), intent(inout) :: this !! Hashtable object integer, intent(in) :: key !! Key from key-val pair to add in hashtable class(*), intent(in) :: val !! Val from key-val pair to add in hashtable ! Work variable integer :: hash hash = mod(key,this%vec_len) + 1 call this%vec(hash)%Put(key=key,val=val) return end subroutine hashtbl_obj_Put