# ErrorMessage

Generates an error message.

## Syntax

Fortran:

ERROR_MESSAGE = DftiErrorMessage( Status )

C:

error_message = DftiErrorMessage( status );

## Description

The error message function generates an error message character string. The maximum length of the string in Fortran is given by the named constant `DFTI_MAX_MESSAGE_LENGTH`. The actual error message is implementation dependent. In Fortran, the user needs to use a character string of length `DFTI_MAX_MESSAGE_LENGTH` as the target. In C, the function returns a pointer to a character string, that is, a character array with the delimiter ' 0'.

Example “Using Status Checking Function” shows how this function can be implemented.

## Interface and Prototype

//Fortran interface

INTERFACE DftiErrorMessage

//Note that the body provided here is to illustrate the different

//argument list and types of dummy arguments. The interface

//does not guarantee what the actual function names are.

//Users can only rely on the function name following the

//keyword INTERFACE

FUNCTION some_actual_function_9( Status, Error_Class )

CHARACTER(LEN=DFTI_MAX_MESSAGE_LENGTH) some_actual_function_9( Status )

INTEGER, INTENT(IN) :: Status

END FUNCTION some_actual_function_9

END INTERFACE DftiErrorMessage

/* C prototype */

char *DftiErrorMessage( long );

Parent topic: Status Checking Functions