Name: H5Awrite
Signature:
  herr_t `H5Awrite`(hid_t `attr_id`, hid_t `mem_type_id`, const void *`buf` )
Purpose:
  Writes data to an attribute.
Description:
  `H5Awrite` writes an attribute, specified with `attr_id`. The attribute's memory datatype is specified with `mem_type_id`. The entire attribute is written from `buf` to the file.

  Datatype conversion takes place at the time of a read or write and is automatic. See the Data Conversion section of The Data Type Interface (H5T) in the HDF5 User's Guide for a discussion of data conversion, including the range of conversions currently supported by the HDF5 libraries.

Parameters:

hid_t `attr_id` | IN: Identifier of an attribute to write.
hid_t `mem_type_id` | IN: Identifier of the attribute datatype (in memory).
const void *`buf` | IN: Data to be written.

Returns:
  Returns a non-negative value if successful; otherwise returns a negative value.
Fortran90 Interface: h5awrite_f

      SUBROUTINE h5awrite_f(attr_id, memtype_id,  buf, dims, hdferr)
        IMPLICIT NONE
        INTEGER(HID_T), INTENT(IN) :: attr_id    ! Attribute identifier
        INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype
                                                 ! identifier  (in memory)
        TYPE, INTENT(IN) :: buf                  ! Data buffer; may be a scalar or
                                                 ! an array
        DIMENSION(*), INTEGER(HSIZE_T), INTENT(IN)  :: dims
                                                 ! Array to hold corresponding
                                                 ! dimension sizes of data buffer buf;
                                                 ! dim(k) has value of the k-th
                                                 ! dimension of buffer buf;
                                                 ! values are ignored if buf is
                                                 ! a scalar
        INTEGER, INTENT(OUT) :: hdferr           ! Error code:
                                                 ! 0 on success and -1 on failure
      END SUBROUTINE h5awrite_f

History:

Release | Fortran90
1.4.2 | The `dims` parameter was added in this release.