netCDF  4.2.1.1
Ignored if NULL

Many of the argurments of netCDF functions are pointers.

For example, the nc_inq() functions takes four pointers:

int nc_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp);

A NULL may be passed for any of these pointers, and it will be ignored. For example, interested in the number of dimensions only, the following code will work:

int ndims;
...
if (nc_inq(ncid, &ndims, NULL, NULL, NULL))
   return SOME_ERROR;

Storage for the Result

User must allocate space for the result of an inq function before the function is called.

 All Data Structures Files Functions Variables Typedefs Defines

Generated on Sat Sep 15 2012 12:44:34 for netCDF. NetCDF is a Unidata library.