5.14 Learn About a Field of a Compound Type: nc_inq_compound_field
Get information about one of the fields of a compound type.
Usage
int nc_inq_compound_field(int ncid, nc_type xtype, int fieldid, char *name,
size_t *offsetp, nc_type *field_typeidp, int *ndimsp,
int *dim_sizesp);
ncid
- The groupid where this compound type exists.
xtype
- The typeid for this compound type, as returned by nc_def_compound, or
nc_inq_var.
fieldid
- A zero-based index number specifying a field in the compound type.
name
- A pointer which, if non-NULL, will get the name of the field.
offsetp
- A pointer which, if non-NULL, will get the offset of the field.
field_typeid
- A pointer which, if non-NULL, will get the typeid of the field.
ndimsp
- A pointer which, if non-NULL, will get the number of dimensions of the field.
dim_sizesp
- A pointer which, if non-NULL, will get the dimension sizes of the field.
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.