Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(btree_i8_cp2d), | intent(inout) | :: | tree | |||
integer(kind=keyt), | intent(in) | :: | key | |||
type(btree_data_cp2d), | intent(in) | :: | value |
SUBROUTINE btree_new_root_i8_cp2d (tree, key, value) TYPE(btree_i8_cp2d), INTENT(INOUT) :: tree INTEGER(KIND=keyt), INTENT(IN) :: key TYPE(btree_data_cp2d), INTENT(IN) :: value TYPE(btree_node_i8_cp2d), POINTER :: old_root, new_root ! CALL btree_new_node_i8_cp2d (tree, new_root) new_root%filled = 1 new_root%keys(1) = key new_root%values(1) = value IF (ASSOCIATED(tree%b%root)) THEN old_root => tree%b%root old_root%parent => new_root new_root%subtrees(1)%node => old_root old_root%parent => new_root END IF tree%b%root => new_root END SUBROUTINE btree_new_root_i8_cp2d