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


5.3 Find a Typeid from Group and Name: NF_INQ_TYPEID

Given a group ID and a type name, find the ID of the type. If the type is not found in the group, then the parents are searched. If still not found, the entire file is searched.

Usage

     INTEGER FUNCTION NF_INQ_TYPEID(INTEGER NCID, CHARACTER NAME, NF_TYPE TYPEIDP)
NCID
The group id.
NAME
The name of a type.
TYPEIDP
The typeid of the named type (if found).

Errors

NF_NOERR
No error.
NF_EBADID
Bad ncid.
NF_EBADTYPE
Can't find type.

Example

The following example is from nf_test/ftst_types3.F:

     C     Go to a child group and find the id of our type.
           retval = nf_inq_grp_ncid(ncid, group_name, sub_grpid)
           if (retval .ne. nf_noerr) call handle_err(retval)
           retval = nf_inq_typeid(sub_grpid, type_name, typeid_in)
           if (retval .ne. nf_noerr) call handle_err(retval)