Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(btree_i8_sp2d), | intent(inout) | :: | tree | |||
type(btree_node_i8_sp2d), | POINTER | :: | node |
SUBROUTINE btree_new_node_i8_sp2d (tree, node) TYPE(btree_i8_sp2d), INTENT(INOUT) :: tree TYPE(btree_node_i8_sp2d), POINTER :: node INTEGER :: i ! ALLOCATE (node) ALLOCATE (node%keys(tree%b%max_fill)) ALLOCATE (node%values(tree%b%max_fill)) ALLOCATE (node%subtrees(tree%b%max_fill + 1)) DO i = 1, tree%b%max_fill + 1 NULLIFY (node%subtrees(i)%node) END DO node%filled = 0 NULLIFY (node%parent) tree%b%lastid = tree%b%lastid + 1 node%id = tree%b%lastid END SUBROUTINE btree_new_node_i8_sp2d