nag_code_to_error_name (x04ndc) (PDF version)
x04 Chapter Contents
x04 Chapter Introduction
NAG Library Manual

NAG Library Function Document

nag_code_to_error_name (x04ndc)

+ Contents

    1  Purpose
    7  Accuracy

1  Purpose

nag_code_to_error_name (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>
#include <nagx04.h>
const char *  nag_code_to_error_name (int code)

3  Description

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

4  References

None.

5  Arguments

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

6  Error Indicators and Warnings

None.

7  Accuracy

Not applicable.

8  Parallelism and Performance

Not applicable.

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)


nag_code_to_error_name (x04ndc) (PDF version)
x04 Chapter Contents
x04 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2014