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: NF_FREE_VLEN, Up: Variable Length Array


5.6.4 Set a Variable Length Array with NF_PUT_VLEN_ELEMENT

Use this to set the element of the (potentially) n-dimensional array of VLEN. That is, this sets the data in one variable length array.

Usage

     INTEGER FUNCTION NF_PUT_VLEN_ELEMENT(INTEGER NCID, INTEGER XTYPE,
             CHARACTER*(*) VLEN_ELEMENT, INTEGER LEN, DATA)
NCID
The ncid of the file that contains the VLEN type.
XTYPE
The type of the VLEN.
VLEN_ELEMENT
The VLEN element to be set.
LEN
The number of entries in this array.
DATA
The data to be stored. Must match the base type of this VLEN.

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     Set up the vlen with this helper function, since F77 can't deal
     C     with pointers.
           retval = nf_put_vlen_element(ncid, vlen_typeid, vlen,
          &     vlen_len, data1)
           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