Next: nc_inq_type, Previous: User Defined Types, Up: User Defined Data Types
Learn the number of types defined in a group, and their IDs.
int nc_inq_typeids(int ncid, int *ntypes, int *typeids);
ncidntypestypeidsNC_NOERRNC_BADIDThe following example is from the test program libsrc4/tst_enums.c.
if (nc_open(FILE_NAME, NC_NOWRITE, &ncid)) ERR;
/* Get type info. */
if (nc_inq_typeids(ncid, &ntypes, typeids)) ERR;
if (ntypes != 1 || !typeids[0]) ERR;