Retrieves the index of a compound or enumeration datatype member


H5T_GET_MEMBER_INDEX (dtype_id, field_name)


<pre><code class="language-c">int H5Tget_member_index( hid_t dtype_id, const char * field_name )</code></pre>

<pre><code class="language-fortran">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</code></pre>

hid_t dtype_idIN: Identifier of datatype to query
const char * field_name    IN: Name of the field or member whose index is to be retrieved


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 a valid field or member index if successful; otherwise returns a negative value.


Coming Soon!

Release    Change
1.4.5Fortran90 Function introduced in this release.
1.4.4C Function introduced in this release.