Last modified: 16 December 2010
Name: H5Acreate1
Signature:
  hid_t `H5Acreate1`( hid_t `loc_id`, const char *`attr_name`, hid_t `type_id`, hid_t `space_id`, hid_t `acpl_id` )

Purpose:
  Creates a dataset as an attribute of another group, dataset, or named datatype.

Deprecated Function:
  This function is deprecated in favor of the function `H5Acreate2`.

Description:
  `H5Acreate1` creates the attribute `attr_name` attached to the object specified with `loc_id`.

  The attribute name specified in `attr_name` must be unique. Attempting to create an attribute with the same name as an already existing attribute will fail, leaving the pre-existing attribute in place. To overwrite an existing attribute with a new attribute of the same name, first call `H5Adelete` then recreate the attribute with `H5Acreate1`.

  The datatype and dataspace identifiers of the attribute, `type_id` and `space_id`, respectively, are created with the H5T and H5S interfaces, respectively.

  Currently only simple dataspaces are allowed for attribute dataspaces.

  The attribute creation property list, `acpl_id`, is currently unused; it may be used in the future for optional attribute properties. At this time, `H5P_DEFAULT` is the only accepted value.

  The attribute identifier returned from this function must be released with `H5Aclose` or resource leaks will develop.

Parameters:

  hid_t `loc_id` | IN: Identifier for the object to which the attribute is to be attached May be any HDF5 object identifier (group, dataset, or committed datatype) or an HDF5 file identifier; if `loc_id` is a file identifer, the attribute will be attached to that file’s root group.
  const char *`attr_name` | IN: Name of attribute to create
  hid_t `type_id` | IN: Identifier of datatype for attribute
  hid_t `space_id` | IN: Identifier of dataspace for attribute
  hid_t `acpl_id` | IN: Identifier of creation property list (Currently not used; specify `H5P_DEFAULT`.)

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

Fortran90 Interface:
  See listing under `H5Acreate`.

History:

  Release | C
  1.8.0 | The function `H5Acreate` renamed to `H5Acreate1` and deprecated in this release.