copy_key Subroutine

public pure subroutine copy_key(old_key, new_key)

Copies the contents of the key, old_key, to the key, new_key (Specifications)

Arguments: old_key - the input key new_key - the output copy of old_key

Arguments

Type IntentOptional Attributes Name
type(key_type), intent(in) :: old_key
type(key_type), intent(out) :: new_key

Source Code

    pure subroutine copy_key( old_key, new_key )
!! Version: Experimental
!!
!! Copies the contents of the key, old_key, to the key, new_key
!! ([Specifications](../page/specs/stdlib_hashmaps.html#copy_key-returns-a-copy-of-the-key))
!!
!! Arguments:
!!     old_key - the input key
!!     new_key - the output copy of old_key
        type(key_type), intent(in)  :: old_key
        type(key_type), intent(out) :: new_key

        new_key % value = old_key % value

    end subroutine copy_key