|
|
|||
|
||||
Create a compound type. Provide an ncid, a name, and a total size (in bytes) of one element of the completed compound type.
After calling this function, fill out the type with repeated calls to NF_INSERT_COMPOUND (see NF_INSERT_COMPOUND). Call NF_INSERT_COMPOUND once for each field you wish to insert into the compound type.
Note that there does not seem to be a way to read such types into structures in Fortran 90 (and there are no structures in Fortran 77).
Fortran users may use character buffers to read and write compound types.
INTEGER FUNCTION NF_DEF_COMPOUND(INTEGER NCID, INTEGER SIZE,
CHARACTER*(*) NAME, INTEGER TYPEIDP)
NCIDSIZENAMETYPEIDPNF_NOERRNF_EBADIDNF_ENAMEINUSENF_EMAXNAMENF_EBADNAMENF_ENOTNC4NF_ESTRICTNC3NF_EHDFERRNF_EPERMNF_ENOTINDEFINEThis example is from nf_test/ftst_types2.F.
C Define a compound type.
retval = nf_def_compound(ncid, cmp_size, type_name,
& cmp_typeid)
if (retval .ne. nf_noerr) call handle_err(retval)
| Contact Us Site Map Search Terms and Conditions Privacy Policy Participation Policy | ||||||
|
||||||