Next: nc_inq_opaque, Previous: Opaque Type, Up: User Defined Data Types
Create an opaque type. Provide a size and a name.
nc_def_opaque(int ncid, char *name, size_t size, nc_type *typeidp);
ncidnamesizetypeidpNC_NOERRNC_EBADTYPEIDNC_EBADFIELDIDNC_EHDFERRThis example is from the test program libsrc4/tst_opaques.c.
/* Create a file that has an opaque attribute. */
if (nc_create(FILE_NAME, NC_NETCDF4, &ncid)) ERR;
if (nc_def_opaque(ncid, BASE_SIZE, TYPE_NAME, &xtype)) ERR;