5.7.2 Learning about a Variable Length Array (VLEN) Type: NF_INQ_VLEN
Use this type to learn about a vlen.
Usage
INTEGER FUNCTION NF_INQ_VLEN(INTEGER NCID, INTEGER XTYPE,
CHARACTER*(*) NAME, INTEGER DATUM_SIZEP, INTEGER
BASE_NF_TYPEP)
NCID
- The ncid of the file that contains the VLEN type.
XTYPE
- The type of the VLEN to inquire about.
NAME
- The name of the VLEN type. The name will be NF_MAX_NAME characters or
less.
DATUM_SIZEP
- A pointer to a size_t, this will get the size of one element of this
vlen.
BASE_NF_TYPEP
- An integer that will get the type of the VLEN base type. (In other
words, what type is this a VLEN of?)
Errors
NF_NOERR
- No error.
NF_EBADTYPE
- Can't find the typeid.
NF_EBADID
- ncid invalid.
NF_EBADGRPID
- Group ID part of ncid was invalid.
Example
This example is from nf_test/ftst_vars4.F.
C Use nf_inq_vlen and make sure we get the same answers as we did
C with nf_inq_user_type.
retval = nf_inq_vlen(ncid, typeids(1), type_name, base_size,
& base_type)
if (retval .ne. nf_noerr) call handle_err(retval)