|
Purpose
|
Reads the values of an attribute. |
|
Return value
|
Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise. |
|
Description
|
SDreadattr reads the values of the attribute specified by the parameter attr_index and stores the values in the buffer attr_buf. It is assumed that the user has called SDattrinfo to retrieve the number of attribute values and allocate sufficient space for the buffer. Note that the routine does not read a subset of attribute values. |
|
|
The value of obj_id can be either an SD interface identifier (sd_id), returned by SDstart, a data set identifier (sds_id), returned by SDselect, or a dimension identifier (dim_id), returned by SDgetdimid. |
|
|
The value of attr_index is a positive integer and is less than the total number of attributes. The index value can be obtained using the routines SDnametoindex and SDreftoindex. The total number of attributes for the object can be obtained using the routines SDgetinfo, SDattrinfo, SDdiminfo and SDfileinfo. |
|
|
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. |