NAG CL Interface
x04ndc (nag_​code_​to_​error_​name)

Settings help

CL Name Style:


1 Purpose

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.

2 Specification

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

3 Description

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(70) returns the string ‘NE_BAD_PARAM’.
x04ndc returns 0 (null pointer) if the input value is not recognized as a valid NAG error code.

4 References

None.

5 Arguments

1: code int Input
On entry: the value of a NAG error code.

6 Error Indicators and Warnings

None.

7 Accuracy

Not applicable.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
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.

9 Further Comments

None.

10 Example

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

10.1 Program Text

Program Text (x04ndce.c)

10.2 Program Data

None.

10.3 Program Results

Program Results (x04ndce.r)