

<!--
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  * Copyright by The HDF Group.                                               *
  * Copyright by the Board of Trustees of the University of Illinois.         *
  * All rights reserved.                                                      *
  *                                                                           *
  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
  * terms governing use, modification, and redistribution, is contained in    *
  * the files COPYING and Copyright.html.  COPYING can be found at the root   *
  * of the source code distribution tree; Copyright.html can be found at the  *
  * root level of an installed copy of the electronic HDF5 document set and   *
  * is linked from the top-level documents page.  It can also be found at     *
  * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
  * access to either file, you may request a copy from help@hdfgroup.org.     *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 -->


<!-- NEW PAGE -->
<!-- HEADER RIGHT "H5Aread" -->
<hr>
<dl>

<dt><div align=right><font color=999999 size=-1><i>
    Last modified: 16 September 2014
    </i></font></div>

<dt><strong>Name:</strong> <a name="Annot-Read">H5Aread</a>
<dt><strong>Signature:</strong>
    <dd><em>herr_t</em> <code>H5Aread</code>(<em>hid_t</em> <code>attr_id</code>,
        <em>hid_t</em> <code>mem_type_id</code>,
        <em>void *</em><code>buf</code>
    )

<p>
<dt><strong>Purpose:</strong>
    <dd>Reads an attribute.

<p>
<dt><strong>Description:</strong>
    <dd><code>H5Aread</code> reads an attribute, specified with 
        <code>attr_id</code>.  The attribute's memory datatype 
        is specified with <code>mem_type_id</code>.  The entire 
        attribute is read into <code>buf</code> from the file. 
        <p>
        Datatype conversion takes place at the time of a read or write
        and is automatic.  See the
        <a href="../UG/HDF5_Users_Guide-Responsive%20HTML5/index.html#t=HDF5_Users_Guide%2FDatatypes%2FHDF5_Datatypes.htm%23TOC_6_10_Data_Transferbc-26&rhtocid=6.5_2">
        &ldquo;Data Transfer: Datatype Conversion and Selection&rdquo;</a> 
        section in the &ldquo;HDF5 Datatypes&rdquo; chapter of the 
        <cite>HDF5 User&rsquo;s Guide</cite> for a discussion of data conversion.

<p>
<dt><strong>Parameters:</strong>
    <ul><table>
        <tr>
            <td valign="top"><em>hid_t</em> <code>attr_id</code></td>
            <td valign="top">IN: Identifier of an attribute to read.</td></tr>
        <tr>
            <td valign="top"><em>hid_t</em>&nbsp;<code>mem_type_id&nbsp;&nbsp;&nbsp;&nbsp;</code></td>
            <td valign="top">IN: Identifier of the attribute datatype 
                (in memory).</td></tr>
        <tr>
            <td valign="top"><em>void *</em><code>buf</code></td>
            <td valign="top">OUT: Buffer for data to be read.</td></tr>
    </table></ul>

<p>
<dt><strong>Returns:</strong>
    <dd>Returns a non-negative value if successful;
        otherwise returns a negative value.

<p>
<dt><strong>Fortran90 Interface:</strong> h5aread_f
    <dd>

        <?php include("H5A/h5aread_f_F90.htm"); ?>

<!-- NEW PAGE -->
<p>
<dt><strong>Fortran2003 Interface:</strong> h5aread_f
    	<dd>

        <?php include("H5A/h5aread_f_F03.htm"); ?>

<p>
<dt><strong>History:</strong>
    <dd><table width="90%">
        <tr>
          <td valign="top" align="left" width="10%">
            <strong>Release</strong>&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td valign="top" align="left">
            <strong>Fortran</strong></td></tr>
        <tr>
          <td valign="top">1.8.8</td>
          <td valign="top">
            Fortran updated to Fortran2003.</td></tr>
        <tr>
          <td valign="top">1.4.2</td>
          <td valign="top">
            The <code>dims</code> parameter was added in this release.</td></tr>
    </table></dd>
</dl>


