Gets an attribute name

Procedure:

H5A_GET_NAME ( attr_id, buf_size, buf )

Signature:

<pre><code class="language-c">ssize_t H5Aget_name(hid_t attr_id,
        size_t buf_size,
        char *buf
    )
</code></pre>

<pre><code class="language-fortran">Fortran90 Interface: h5aget_name_f
    
SUBROUTINE h5aget_name_f(attr_id, size, buf, hdferr)
  IMPLICIT NONE
  INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier 
  INTEGER(SIZE_T), INTENT(IN) :: size            ! Buffer size 
  CHARACTER(LEN=*), INTENT(INOUT) :: buf   
                                               ! Buffer to hold attribute name
  INTEGER, INTENT(OUT) :: hdferr         ! Error code:
                                         ! name length is successful,
                                         ! -1 if fail
END SUBROUTINE h5aget_name_f

</code></pre>

Parameters:
hid_t attr_idIN: Identifier of the attribute
size_t buf_size    IN: The size of the buffer to store the name in
char *bufOUT: Buffer to store name in

Description:

H5A_GET_NAME retrieves the name of an attribute specified by the identifier, attr_id. Up to buf_size characters are stored in buf followed by a \0 string terminator. If the name of the attribute is longer than (buf_size -1), the string terminator is stored in the last position of the buffer to properly terminate the string.

If the user only wants to find out the size of this name, the values 0 and NULL can be passed in for the parameters bufsize and buf.

Returns:

Returns the length of the attribute's name, which may be longer than buf_size, if successful. Otherwise returns a negative value.

Example:

Coming Soon!

History:
None