Commits a transient datatype to a file, creating a new named datatype
Procedure:
H5T_COMMIT1 (loc_id, name, dtype_id)
Signature:
herr_t H5Tcommit1( hid_t loc_id, const char * name, hid_t dtype_id )
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
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 |
Description:
H5T_COMMIT1 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 H5T_COMMIT_ANON for a discussion of the differences between H5T_COMMIT and H5T_COMMIT_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.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value.
Example:
History:
Release | Change |
---|
1.8.7 | Function modified in this release to reject datatypes that will not accommodate actual data, such as a compound datatype with no fields or an enumerated datatype with no members. |
1.8.0 | The function H5Tcommit renamed to H5Tcommit1 and deprecated in this release. |
--- Last Modified: May 03, 2019 | 03:14 PM