Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Next: , Previous: Variable Length Array, Up: Variable Length Array



5.6.1 Define a Variable Length Array (VLEN): NF_DEF_VLEN

Use this function to define a variable length array type.

Usage

     INTEGER FUNCTION NF_DEF_VLEN(INTEGER NCID, CHARACTER*(*) NAME,
             INTEGER BASE_TYPEID, INTEGER XTYPEP)
NCID
The ncid of the file to create the VLEN type in.
NAME
A name for the VLEN type.
BASE_TYPEID
The typeid of the base type of the VLEN. For example, for a VLEN of shorts, the base type is NF_SHORT. This can be a user defined type.
XTYPEP
The typeid of the new VLEN type will be set here.

Errors

NF_NOERR
No error.
NF_EMAXNAME
NF_MAX_NAME exceeded.
NF_ENAMEINUSE
Name is already in use.
NF_EBADNAME
Attribute or variable name contains illegal characters.
NF_EBADID
ncid invalid.
NF_EBADGRPID
Group ID part of ncid was invalid.
NF_EINVAL
Size is invalid.
NF_ENOMEM
Out of memory.

Example

This example is from nf_test/ftst_vars4.F.

     C     Create the vlen type.
           retval = nf_def_vlen(ncid, vlen_type_name, nf_int, vlen_typeid)
           if (retval .ne. nf_noerr) call handle_err(retval)
 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690