Home | Previous Page | Next Page   Function Descriptions >

mi_string_to_decimal( )

The mi_string_to_decimal( ) function converts a text (string) representation of a decimal value to its binary (internal) DECIMAL representation.

Syntax

mi_decimal *mi_string_to_decimal(decimal_string)
   mi_string *decimal_string;
decimal_string
is a pointer to the decimal string to convert to its internal DECIMAL format.
Valid in Client LIBMI Application? Valid in User-Defined Routine?
Yes Yes

Usage

The mi_string_to_decimal( ) function converts the decimal string that decimal_string references to its internal DECIMAL (mi_decimal) value. An internal DECIMAL value is the format that the database server uses to store a value in a DECIMAL column of the database. This format can represent both fixed-point and floating-point decimal numbers.

Important:
The mi_string_to_decimal( ) function replaces the mi_decimal_to_binary( ) function for string-to-internal-DECIMAL conversion in DataBlade API modules.
Global Language Support

The mi_string_to_decimal( ) function accepts the decimal string in the numeric format of the current processing locale. For more information, see the IBM Informix: GLS User's Guide.

End of Global Language Support

Return Values

An mi_decimal pointer
is a pointer to the internal DECIMAL representation that mi_string_to_decimal( ) has created.
NULL
indicates that the function was not successful.

Related Topics

See also the descriptions of mi_decimal_to_string( ), mi_string_to_date( ), mi_string_to_datetime( ), mi_string_to_interval( ), and mi_string_to_money( ).

For more information on how to convert decimal strings to internal DECIMAL format, see the IBM Informix: DataBlade API Programmer's Guide.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]