Last modified: 3 May 2011
Name: H5Tcommit1
Signature:
  herr_t `H5Tcommit1`( hid_t `loc_id`, const char * `name`, hid_t `dtype_id` )
Purpose:
  Commits a transient datatype to a file, creating a new named datatype.

Notice:
  This function is deprecated in favor of the function `H5Tcommit2`.

Description:
  `H5Tcommit1` commits the transient datatype (not immutable) to a file, turning it into a named datatype.

  The datatype `dtype_id` is committed as a named datatype at the location `loc_id`, which is either a file or group identifier, with the name `name`.

  `name` can be a relative path based at `loc_id` or an absolute path from the root of the file. Use of this function requires that any intermediate groups specified in the path already exist.

  As is the case for any object in a group, the length of the name of a named datatype is not limited.

  See `H5Tcommit_anon` for a discussion of the differences between `H5Tcommit` and `H5Tcommit_anon`.

  This function will not accept a datatype that cannot actually hold data. This currently includes compound datatypes with no fields and enumerated datatypes with no members.

Parameters:

hid_t `loc_id` | IN: File or group identifier
const char * `name` | IN: Name given to committed datatype
hid_t `dtype_id` | IN: Identifier of datatype to be committed and, upon function’s return, identifier for the committed datatype

Returns:
  Returns a non-negative value if successful; otherwise returns a negative value.

Fortran90 Interface: h5tcommit_f

      SUBROUTINE h5tcommit_f(loc_id, name, type_id, hdferr)
        IMPLICIT NONE
        INTEGER(HID_T), INTENT(IN) :: loc_id  ! File or group identifier
        CHARACTER(LEN=*), INTENT(IN) :: name  ! Datatype name within file or group
        INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
        INTEGER, INTENT(OUT) :: hdferr        ! Error code
                                              ! 0 on success and -1 on failure
      END SUBROUTINE h5tcommit_f

History:

  Release | C
  1.8.0 | The function `H5Tcommit` renamed to `H5Tcommit1` and deprecated in this release.
  1.8.7 | Function modified in this release to reject datatypes that will not accomodate actual data, such as a compound datatype with no fields or an enumerated datatype with no members.