Returns a pointer to a node in a list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(list), | intent(in) | :: | me | |||
| class(*), | intent(in) | :: | key | |||
| type(node), | intent(out), | pointer | :: | p_node |
subroutine get_node(me,key,p_node) implicit none class(list),intent(in) :: me class(*),intent(in) :: key type(node),pointer,intent(out) :: p_node type(node),pointer :: p nullify(p_node) p => me%head do if (associated(p)) then if (me%keys_equal(p%key,key)) then p_node => p return end if p => p%next else return !not found end if end do end subroutine get_node