[Back to Interface] [Prev] [Next]

VSsetattr/vsfsnat/vsfscat

intn VSsetattr(int32 vdata_id, int32 field_index, char *attr_name, int32 data_type, int32 count, VOIDP values)

vdata_id IN:

Vdata identifier returned by VSattach

field_index IN:

Index of the field

attr_name IN:

Name of the attribute

data_type IN:

Data type of the attribute

count IN:

Number of attribute values

values IN:

Buffer containing the attribute values

Purpose

Sets an attribute of a vdata or a vdata field.

Return value

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

Description

VSsetattr defines an attribute that has the name specified by the parameter attr_name, the data type specified by the parameter data_type, and the number of values specified by the parameter count, and that contains the values specified in the parameter values. The attribute is set for either the vdata or a vdata field depending on the value of the parameter field_index.

If the field already has an attribute with the same name, the current values will be replaced with the new values if the new data type and order are the same as the current ones. Any changes in the field data type or order will result in a value of FAIL (or -1) to be returned.

If field_index value is set to _HDF_VDATA (or -1), the attribute will be set for the vdata. If field_index is set to the field index, attribute will be set for the vdata field. Field index is a nonnegative integer less than the total number of the vdata fields. The number of vdata fields can be obtained using VFnfields.

The value of the parameter data_type can be any one of the data types listed in Table 1A in Section I of this manual.

FORTRAN

integer function vsfsnat(vdata_id, field_index, attr_name, data_type, count, values)

integer vdata_id, field_index, data_type, count, values(*)

character*(*) attr_name

integer function vsfscat(vdata_id, field_index, attr_name, data_type, count, values)

integer vdata_id, field_index, data_type, count

character*(*) attr_name, values(*)



[Back to Interface] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF Reference Manual - 07/29/98, NCSA HDF Development Group.