Name: H5Tcopy
Signature:
  hid_t `H5Tcopy`(hid_t `type_id`)
Purpose:
  Copies an existing datatype.
Description:
  `H5Tcopy` copies an existing datatype. The returned type is always transient and unlocked.

  The `type_id` argument can be either a datatype identifier, a predefined datatype (defined in `H5Tpublic.h`), or a dataset identifier. If `type_id` is a dataset identifier instead of a datatype identifier, then this function returns a transient, modifiable datatype which is a copy of the dataset's datatype.

  The datatype identifier returned should be released with `H5Tclose` or resource leaks will occur.

Parameters:

hid_t `type_id` | Identifier of datatype to copy. Can be a datatype identifier, a predefined datatype (defined in `H5Tpublic.h`), or a dataset identifier.

Returns:
  Returns a datatype identifier if successful; otherwise returns a negative value
Fortran90 Interface: h5tcopy_f

      SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr)
        IMPLICIT NONE
        INTEGER(HID_T), INTENT(IN) :: type_id      ! Datatype identifier
        INTEGER(HID_T), INTENT(OUT) :: new_type_id ! Identifier of datatype's copy
        INTEGER, INTENT(OUT) :: hdferr             ! Error code
                                                   ! 0 on success and -1 on failure
      END SUBROUTINE h5tcopy_f