[Top] [Prev] [Next] [Bottom]

SDreadattr/sfrnatt/sfrcatt

intn SDreadattr(int32 [file, sds, dim]_id, int32 attr_index, VOIDP data)
[file, sds, dim]_id

IN:

Identifier of the object the attribute is to be attached to: an file_id for a file, an sds_id for an SDS or a dim_id for a dimension

attr_index

IN:

Index of the attribute to be read

data

OUT:

Buffer for the attribute values

Purpose

Reads the values of an attribute.

Return value

Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.

Description

It's assumed that the user has called SDattrinfo and that the buffer is large enough to store the data. If an attribute has multiple values stored for it, this routine will return all of them. It is not possible to read a subset of attribute values.

Note that this routine has two Fortran-77 versions: sfrnatt and sfrcatt. The sfrnatt routine reads numeric attribute data and sfrcatt reads character attribute data.

The index returned as the attr_index argument is one-based.

FORTRAN

integer function sfrnatt([file, sds, dim]_id, attr_index, data)

integer [file, sds, dim]_id, attr_index

<valid numeric data> data

integer function sfrcatt([file, sds, dim]_id, attr_index, data)

integer [file, sds, dim]_id, attr_index

character* (*) data



[Top] [Prev] [Next] [Bottom]

hdfhelp@ncsa.uiuc.edu
HDF User's Reference Manual, Draft 06/09/97, NCSA HDF Development Group.