HDF5 FORTRAN Developer's Guide

## H5A (F03)

[ Top ] [ Modules ]

NAME

      H5A_PROVISIONAL

FILE

      src/fortran/src/H5Aff_F03.f90

PURPOSE

      This file contains Fortran 90 and Fortran 2003 interfaces for H5A functions.
      It contains the same functions as H5Aff_F90.f90 but includes the
      Fortran 2003 functions and the interface listings. This file will be compiled
      instead of H5Aff_F90.f90 if Fortran 2003 functions are enabled.

NOTES

      (A) C_LOC and character strings according to the Fortran 2003 standard:

      15.1.2.5 C_LOC(X)

      Argument. X shall either

      (1) have interoperable type and type parameters and be
        (a) a variable that has the TARGET attribute and is interoperable,
        (b) an allocated allocatable variable that has the TARGET attribute
            and is not an array of zero size, or
        (c) an associated scalar pointer, or
      (2) be a nonpolymorphic scalar, have no length type parameters, and be
        (a) a nonallocatable, nonpointer variable that has the TARGET attribute,
        (b) an allocated allocatable variable that has the TARGET attribute, or
        (c) an associated pointer.

      - When X is a character, for interoperability the standard is:

      15.2.1 Interoperability of intrinsic types

      ...if the type is character, interoperability also requires that the length type parameter
      be omitted or be specified by an initialization expression whose value is one.

      THEREFORE compilers that have not extended the standard  require

      CHARACTER(LEN=1), TARGET :: chr
      or
      CHARACTER, TARGET :: chr

      (B)
                             *** IMPORTANT ***
      If you add a new H5A function you must add the function name to the
      Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
      This is needed for Windows based operating systems.

## h5aread_f

[ Top ] [ H5A (F03) ] [ Subroutines ]

NAME

      h5aread_f

PURPOSE

      Reads an attribute.

INPUTS

      attr_id       - attribute identifier
      memtype_id    - attribute memory type identifier
      dims          - 1D array of size 7, stores sizes of the
                    - buf array dimensions.

OUTPUTS

      buf           - buffer to read attribute data in
      hdferr        - Returns 0 if successful and -1 if fails

AUTHOR

      Elena Pourmal
      August 12, 1999

HISTORY

      Explicit Fortran interfaces are added for
      called C functions (it is needed for Windows
      port).  February 27, 2001

      dims parameter was added to make code portable;
      Aprile 4, 2001

      Changed buf intent to INOUT to be consistant
      with how the C functions handles it. The pg
      compiler will return 0 if a buf value is not set.
      February, 2008

NOTES

      This function is overloaded to write INTEGER,
      REAL, DOUBLE PRECISION and CHARACTER buffers
      up to 7 dimensions.