Routines (alphabetical) > Routines: H > HDF Routines > HDF_VD_NATTRS

# HDF_VD_NATTRS

The HDF_VD_NATTRS function returns the number of attributes associated with the specified VData or VData/field pair.

## Examples

For an example using this routine, see HDF_VD_ATTRSET.

## Syntax

Result = HDF_VD_NATTRS( VData, FieldID )

## Return Value

Returns the number of attributes if successful. Otherwise, –1 is returned.

## Arguments

### VData

The VData handle returned by a previous call to HDF_VD_ATTACH.

### FieldID

A zero-based index specifying the field, or a string containing the name of the field, within the VData whose attributes are to be counted. Setting Index to –1 specifies that attributes attached to the VData itself are to be counted.

## Keywords

None

## Version History

5.5 | Introduced

## See Also

HDF_VD_ATTRFIND, HDF_VD_ATTRINFO, HDF_VD_ATTRSET, HDF_VD_ISATTR