Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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



5.2 Learn the IDs of All Types in Group: nc_inq_typeids

Learn the number of types defined in a group, and their IDs.

Usage

     int nc_inq_typeids(int ncid, int *ntypes, int *typeids);
ncid
The group id.
ntypes
A pointer to int which will get the number of types defined in the group. If NULL, ignored.
typeids
A pointer to an int array which will get the typeids. If NULL, ignored.

Errors

NC_NOERR
No error.
NC_BADID
Bad ncid.

Example

The 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;
 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690