Opens the attribute specified by its index (DEPRECATED)

This function is deprecated in favor of the function  H5A_OPEN_BY_IDX .



H5A_OPEN_IDX(loc_id, idx)


<pre><code class="language-c">hid_t H5Aopen_idx
    hid_t        loc_id,
    unsigned int idx

<pre><code class="language-fortran">SUBROUTINE h5aopen_idx_f(obj_id, index, attr_id, hdferr) 
  INTEGER(HID_T), INTENT(IN) :: obj_id    ! Object identifier 
  INTEGER, INTENT(IN) :: index            ! Attribute index 
  INTEGER(HID_T), INTENT(OUT) :: attr_id  ! Attribute identifier 
  INTEGER, INTENT(OUT) :: hdferr          ! Error code:
                                          ! 0 on success and -1 on failure
END SUBROUTINE h5aopen_idx_f</code></pre>

hid_t loc_idIN: Identifier of the group, dataset, or named datatype attribute to be attached to
unsigned int idx    IN: Index of the attribute to open


H5A_OPEN_IDX  opens an attribute which is attached to the object specified with  loc_id . The location object may be either a group, dataset, or named datatype, all of which may have any sort of attribute. The attribute specified by the index,  idx , indicates the attribute to access. The value of  idx  is a 0-based, non-negative integer. The attribute identifier returned from this function must be released with  H5A_CLOSE  or resource leaks will develop.


Returns attribute identifier if successful; otherwise returns a negative value.


Coming Soon!