Next: , Previous: nc_inq_grpname_full, Up: Groups


3.7 Find the Length of a Group's Full Name: nc_inq_grpname_len

Given ncid, find len of the full name, as returned by nc_inq_grpname_full See nc_inq_grpname_full. (Root group is named "/", with length 1.)

Usage

     int nc_inq_grpname_len(int ncid, size_t *lenp);
ncid
The group id for this operation.
lenp
Pointer to an int where the length will be placed. Length does not include NULL terminator.

Errors

NC_NOERR
No error.
NC_EBADID
Bad group id.
NC_ENOTNC4
Attempting a netCDF-4 operation on a netCDF-3 file. NetCDF-4 operations can only be performed on files defined with a create mode which includes flag HDF5. (see nc_open).
NC_ESTRICTNC3
This file was created with the strict netcdf-3 flag, therefore netcdf-4 operations are not allowed. (see nc_open).
NC_EHDFERR
An error was reported by the HDF5 layer.

Example

This example is from libsrc4/tst_grps.c.

           int ncid;
           size_t len;
     
           ...
     
           if (nc_inq_grpname_len(ncid, &len)) ERR;