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
Parameters:
hid_tattr_id
IN: Identifier of the attribute
size_tbuf_size
IN: The size of the buffer to store the name in
char *buf
OUT: 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.