Next: , Previous: nc_inq_compound_field, Up: User Defined Data Types


5.15 Find the Name of a Field in a Compound Type: nc_inq_compound_fieldname

Given the typeid and the fieldid, get the name.

Usage

     int nc_inq_compound_fieldname(nc_type typeid, int fieldid, char *name);
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.
name
Pointer to an already allocated char array which will get the name, as a null terminated string. It will have a maximum length of NC_MAX_NAME+1.

Errors

NC_NOERR
No error.
NC_EBADTYPEID
Bad type id.
NC_EBADFIELDID
Bad field id.
NC_EHDFERR
An error was reported by the HDF5 layer.

Example

See the example section for nc_inq_compound.