The mi_decimal_to_string() function

The mi_decimal_to_string() function creates a text (string) representation of a decimal value from the binary (internal) DECIMAL representation.

Syntax

mi_string *mi_decimal_to_string(decimal_data)
   mi_decimal *decimal_data;
decimal_data
A pointer to the internal DECIMAL representation of the decimal value.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_decimal_to_string() function converts the internal DECIMAL value that decimal_data contains into a decimal string. An internal DECIMAL value is the format that the database server uses to store a value in a DECIMAL column of the database.
Important: The mi_decimal_to_string() function replaces the mi_binary_to_decimal() function for internal DECIMAL-to-string conversion in DataBlade® API modules.

For GLS, the mi_decimal_to_string() function formats the decimal string in the numeric format of the current processing locale. For more information, see the Informix® GLS User's Guide.

For more information about how to convert internal DECIMAL values to decimal strings, see the Informix® DataBlade® API Programmer's Guide.

Return values

An mi_string pointer
A pointer to the decimal string that mi_decimal_to_string() has created.
NULL
The function was not successful.