informix
Informix DataBlade API Programmer's Manual
DataBlade API 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

Usage

The mi_string_to_decimal() function converts the decimal string that decimal_string references to its the 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.

The mi_string_to_decimal() function accepts the decimal string in the numeric format of the current processing locale. For more information, see the Informix Guide to GLS Functionality.

Return Values

mi_decimal * 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 the descriptions of the following functions: 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 Converting Decimal Data.


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved