Adding Attributes to a Vdata and its FieldsFollowing are the calls that you need to do this:
C:
istat = VSsetattr (vdata_id, _HDF_VDATA, "Fixed_type", DFNT_INT32,
4, (VOIDP)values);
istat = VSsetattr (vdata_id, 2, "Symbol", DFNT_CHAR, 3, "MAX");
FORTRAN:
retn = vsfsnat(vdata_id, -1, 'Fixed_type', DFNT_INT32, 4, values)
retn = vsfscat(vdata_id, 2, 'Symbol', DFNT_CHAR8, 3, 'MAX')
Following is the vd_ex4 program in HTML that adds attributes.
You can optionally download this program, and
compile and run it.
To see what the resulting HDF file looks like with attributes, see
the next section, "Contents of HDF File with Attributes":