Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(btree_i8_dp2d), | intent(in) | :: | tree | |||
integer(kind=keyt), | intent(in) | :: | key | |||
type(btree_data_dp2d), | intent(out) | :: | value | |||
logical, | intent(out), | optional | :: | exists |
SUBROUTINE btree_find_i8_dp2d (tree, key, value, exists) TYPE(btree_i8_dp2d), INTENT(IN) :: tree INTEGER(KIND=keyt), INTENT(IN) :: key TYPE(btree_data_dp2d), INTENT(OUT) :: value LOGICAL, INTENT(OUT), OPTIONAL :: exists ! TYPE(btree_node_i8_dp2d), POINTER :: node INTEGER :: position ! CALL btree_find_full_i8_dp2d (tree, key, node, position, short=.TRUE.) IF (PRESENT(exists)) THEN exists = position .GT. 0 END IF IF (position .GT. 0) THEN value = node%values(position) END IF END SUBROUTINE btree_find_i8_dp2d