Retrieves the index of a compound or enumeration datatype member
Procedure:
H5T_GET_MEMBER_INDEX (dtype_id, field_name)
Signature:
int H5Tget_member_index( hid_t dtype_id, const char * field_name )
SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr)
INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
CHARACTER(LEN=*), INTENT(IN) :: name ! Member name
INTEGER, INTENT(OUT) :: index ! Member index
INTEGER, INTENT(OUT) :: hdferr ! Error code
END SUBROUTINE h5tget_member_index_f
Parameters:
hid_t dtype_id | IN: Identifier of datatype to query |
const char * field_name | IN: Name of the field or member whose index is to be retrieved |
Description:
H5T_GET_MEMBER_INDEX retrieves the index of a field of a compound datatype or an element of an enumeration datatype.
The name of the target field or element is specified in field_name
.
Fields are stored in no particular order with index values of 0 through N-1, where N is the value returned by H5T_GET_NMEMBERS .
Returns:
Returns a valid field or member index if successful; otherwise returns a negative value.
Example:
History:
Release | Change |
---|
1.4.5 | Fortran90 Function introduced in this release. |
1.4.4 | C Function introduced in this release. |
--- Last Modified: May 16, 2019 | 09:39 AM