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: NF_INSERT_ENUM, Up: Enum Type



5.8.3 Learn About a Enum Type: NF_INQ_ENUM

Get information about a user-defined enumeration type.

Usage

     INTEGER FUNCTION NF_INQ_ENUM(INTEGER NCID, INTEGER XTYPE,
             CHARACTER*(*) NAME, INTEGER BASE_NF_TYPE, INTEGER BASE_SIZE,
             INTEGER NUM_MEMBERS)
NCID
The group ID of the group which holds the enum type.
XTYPE
The typeid for this enum type, as returned by NF_DEF_ENUM, or NF_INQ_VAR.
NAME
Character array which will get the name. It will have a maximum length of NF_MAX_NAME.
BASE_NF_TYPE
An integer which will get the base integer type of this enum.
BASE_SIZE
An integer which will get the size (in bytes) of the base integer type of this enum.
NUM_MEMBERS
An integer which will get the number of members defined for this enumeration type.

Errors

NF_NOERR
No error.
NF_EBADTYPEID
Bad type id.
NF_EHDFERR
An error was reported by the HDF5 layer.

Example

In this example from nf_test/ftst_vars3.F, an enum type is created and then examined:

           retval = nf_inq_enum(ncid, typeids(1), type_name, base_type,
          &     base_size, num_members)
           if (retval .ne. nf_noerr) call handle_err(retval)
           if (base_type .ne. NF_INT .or. num_members .ne. 2) stop 2
 
 
  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