Next: , Previous: Opaque Type, Up: Opaque Type


5.8.1 Creating Opaque Types: NF_DEF_OPAQUE

Create an opaque type. Provide a size and a name.

Usage

     INTEGER FUNCTION NF_DEF_OPAQUE(INTEGER NCID, CHARACTER*(*) NAME,
             INTEGER SIZE, INTEGER TYPEIDP)
NCID
The groupid where the type will be created. The type may be used anywhere in the file, no matter what group it is in.
NAME
The name for this type. Must be shorter than NF_MAX_NAME.
SIZE
The size of each opaque object.
TYPEIDP
Pointer where the new typeid for this type is returned. Use this typeid when defining variables of this type with NF_DEF_VAR.

Errors

NF_NOERR
No error.
NF_EBADTYPEID
Bad typeid.
NF_EBADFIELDID
Bad fieldid.
NF_EHDFERR
An error was reported by the HDF5 layer.

Example

This example is from nf_test/ftst_vars3.F.

     C     Create the opaque type.
           retval = nf_def_opaque(ncid, opaque_size, opaque_type_name,
          &     opaque_typeid)
           if (retval .ne. nf_noerr) call handle_err(retval)