.. highlightlang:: us .. index:: nc_last_error .. _nc_last_error: nc_last_error ============= .. us.tag nc_last_error ENGLISH NC New560 :ref:`nc_last_error` returns the last error that occurred of UniPlot data files. If the last invoked ``nc_``-function returned without an error the function will return 0. .. function:: ncerr = nc_last_error(ncid) .. us.return **Return Value** .. us.params **Parameters** .. uparam:: ncid Identifies the netCDF file. See :ref:`nc_create` or :ref:`nc_open`. .. us.comment **Comment** The function can only be used for netCDF-up files. See :ref:`nc_create`. For netCDF files (``NC_FORMAT_CLASSIC`` and ``NC_FORMAT_PC``) the function always returns -1. .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.6.0 - New. .. seealso:: :ref:`overview-netcdf-files`, :ref:`nc_fatal_error`, :ref:`nc_str_error` :sub:`id-1228882`