Next: NF_INSERT_ENUM, Previous: Enum Type, Up: Enum Type
Create an enum type. Provide an ncid, a name, and a base integer type.
After calling this function, fill out the type with repeated calls to NF_INSERT_ENUM (see NF_INSERT_ENUM). Call NF_INSERT_ENUM once for each value you wish to make part of the enumeration.
INTEGER FUNCTION NF_DEF_ENUM(INTEGER NCID, INTEGER BASE_TYPEID,
CHARACTER*(*) NAME, INTEGER TYPEIDP)
NCIDBASE_TYPEIDNAMETYPEIDPNF_NOERRNF_EBADIDNF_ENAMEINUSENF_EMAXNAMENF_EBADNAMENF_ENOTNC4NF_ESTRICTNC3NF_EHDFERRNF_EPERMNF_ENOTINDEFINEThis example is from nf_test/ftst_vars3.F.
C Create the enum type.
retval = nf_def_enum(ncid, NF_INT, enum_type_name, enum_typeid)
if (retval .ne. nf_noerr) call handle_err(retval)