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



5.8.4 Learn the Name of a Enum Type: nf_inq_enum_member

Get information about a member of an enum type.

Usage

     INTEGER FUNCTION NF_INQ_ENUM_MEMBER(INTEGER NCID, INTEGER XTYPE,
             INTEGER IDX, CHARACTER*(*) NAME, INTEGER VALUE)
NCID
The groupid where this enum type exists.
XTYPE
The typeid for this enum type.
IDX
The one-based index number for the member of interest.
NAME
A character array which will get the name of the member. It will have a maximum length of NF_MAX_NAME.
VALUE
An integer that will get the value associated with this member.

Errors

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

Example

This example is from nf_test/ftst_vars3.F:

     C     Check the members of the enum type.
           retval = nf_inq_enum_member(ncid, typeids(1), 1, member_name,
          &     member_value)
           if (retval .ne. nf_noerr) call handle_err(retval)
           if (member_name(1:len(zero_name)) .ne. zero_name .or.
          &     member_value .ne. 0) stop 2
           retval = nf_inq_enum_member(ncid, typeids(1), 2, member_name,
          &     member_value)
           if (retval .ne. nf_noerr) call handle_err(retval)
           if (member_name(1:len(one_name)) .ne. one_name .or.
          &     member_value .ne. 1) 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