Page tree

The license could not be verified: License Certificate has expired!

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

 

JAVA

FORTRAN

C++

C

 

Link

H5A_OPEN_NAME

Opens an attribute specified by name. (DEPRECATED)

This function is deprecated in favor of the function H5Aopen_by_name.

 

Procedure:
H5A_OPEN_NAME (loc_id, name)

Signature:

hid_t H5Aopen_name(
        hid_t loc_id,
        const char *name
    )

Fortran90 Interface: h5aopen_name_f
    
    SUBROUTINE h5aopen_name_f(obj_id, name, attr_id, hdferr) 
  IMPLICIT NONE
  INTEGER(HID_T), INTENT(IN) :: obj_id    ! Object identifier 
  CHARACTER(LEN=*), INTENT(IN) :: name    ! Attribute name
  INTEGER(HID_T), INTENT(OUT) :: attr_id  ! Attribute identifier 
  INTEGER, INTENT(OUT) :: hdferr          ! Error code:
                                          ! 0 on success and -1 on failure
END SUBROUTINE h5aopen_name_f
    

Replace this text with the C++ Function Signature

Replace this text with the JAVA Function Signature

Parameters:
hid_t loc_idIN: Identifier of a group, dataset, or named datatype that attribute is attached to.
const char *name    IN: Attribute name.

Description:
H5Aopen_name opens an attribute specified by its name, name, which is attached to the object specified with loc_id. The location object may be either a group, dataset, or named datatype, which may have any sort of attribute. The attribute identifier returned from this function must be released with H5Aclose or resource leaks will develop.

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

Example:

examples / h5_subset.c [32:42]  1.10/master  HDFFV/hdf5
int
main (void)
{
    hsize_t     dims[2], dimsm[2];   
    int         data[DIM0][DIM1];           /* data to write */
    int         sdata[DIM0_SUB][DIM1_SUB];  /* subset to write */
    int         rdata[DIM0][DIM1];          /* buffer for read */
 
    hid_t       file_id, dataset_id;        /* handles */
    hid_t       dataspace_id, memspace_id; 

     PROGRAM COMPOUNDEXAMPLE

     USE HDF5 ! This module contains all necessary modules

     IMPLICIT NONE

     CHARACTER(LEN=11), PARAMETER :: filename = "compound.h5" ! File name
     CHARACTER(LEN=8), PARAMETER :: dsetname = "Compound"     ! Dataset name
     INTEGER, PARAMETER :: dimsize = 6 ! Size of the dataset

     INTEGER(HID_T) :: file_id       ! File identifier

History:
 

--- Last Modified: November 08, 2017 | 12:25 PM