5.12 Learn the Number of Fields in a Compound Type: nc_inq_compound_nfields
Get the number of fields of a compound type.
Usage
nc_inq_compound_nfields(int ncid, nc_type xtype, size_t *nfieldsp);
ncid- The groupid where this compound type exists.
xtype- The typeid for this compound type.
nfieldsp- A pointer, which, if not NULL, get the number of fields of the
compound type.
Errors
NC_NOERR- No error.
NC_EBADTYPEID- Bad type id.
NC_EHDFERR- An error was reported by the HDF5 layer.
Example
See the example section for nc_inq_compound.