Remove a node from the dictionary, given the key.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dictionary), | intent(inout) | :: | self | The dictionary. |
||
class(*), | intent(in) | :: | key | The key. |
subroutine remove(self, key)
!---------------------------------------------------------------------------------------------------------------------------------
!< Remove a node from the dictionary, given the key.
!---------------------------------------------------------------------------------------------------------------------------------
class(dictionary), intent(inout) :: self !< The dictionary.
class(*), intent(in) :: key !< The key.
type(dictionary_node), pointer :: p !< Pointer to scan the dictionary.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
p => self%node(key=key)
if (associated(p)) call self%remove_by_pointer(p=p)
!---------------------------------------------------------------------------------------------------------------------------------
endsubroutine remove