5.17 Get the Offset of a Field: nc_inq_compound_fieldoffset
Given the typeid and fieldid, get the offset.
Usage
int nc_inq_compound_fieldoffset(nc_type typeid, int fieldid,
size_t *offsetp);
typeid
- The typeid for this compound type, as returned by nc_def_compound, or
nc_inq_var.
fieldid
- The id of the field in the compound type. Fields are numbered starting
with 0 for the first inserted field.
offsetp
- A pointer to a size_t. The offset of the field will be placed there.
Errors
NC_NOERR
- No error.
NC_EBADTYPEID
- Bad typeid.
NC_EBADFIELDID
- Bad fieldid.
NC_EHDFERR
- An error was reported by the HDF5 layer.
Example
See the example section for nc_inq_compound.