# NAG CL Interfacex04ndc

## 1Purpose

x04ndc converts an integer error code to its corresponding string error name. The integer error code is typically returned as part of the NAG error structure by a prior call to a NAG C Library function.

## 2Specification

 #include
 const char * x04ndc (int code)
The function may be called by the names: x04ndc or nag_code_to_error_name.

## 3Description

x04ndc takes as input the value of the integer error code returned in the NAG error structure and returns the corresponding string error name. This can be useful when you want to print the returned error code as a name. For example the NE_BAD_PARAM code has the value $70$. A call to x04ndc$\left(70\right)$ returns the string ‘NE_BAD_PARAM’.
x04ndc returns $0$ (null pointer) if the input value is not recognized as a valid NAG error code.

None.

## 5Arguments

1: $\mathbf{code}$int Input
On entry: the value of a NAG error code.

None.

Not applicable.

## 8Parallelism and Performance

x04ndc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

None.

## 10Example

This example produces error name strings corresponding to a number of integer error codes.

### 10.1Program Text

Program Text (x04ndce.c)

None.

### 10.3Program Results

Program Results (x04ndce.r)