informix
INFORMIX-ESQL/C Programmer's Manual
ESQL/C Function Library

rfmtdouble()

The rfmtdouble() function uses a formatting mask to convert a double value to a character string.

Syntax

Usage

The fmtstring argument of the rfmtdouble() function points to the numeric-formatting mask, which contains characters that describe how to format the double value. For more information on these formatting characters, see Formatting Numeric Strings.

When you use rfmtdouble() to format MONEY values, the function uses the currency symbols that the DBMONEY environment variable specifies. If you do not set this environment variable, rfmtdouble() uses the currency symbols that the client locale defines. The default locale, U.S. English, defines currency symbols as if you set DBMONEY to "$,.". (For a discussion of DBMONEY, see the Informix Guide to SQL: Reference).

When you use a nondefault locale that has a multibyte code set, rfmtdouble() supports multibyte characters in the format string. For more information, see the Informix Guide to GLS Functionality.

Return Codes

0

The conversion was successful.

-1211

The program ran out of memory (memory-allocation error).

-1217

The format string is too large.

Example

The demo directory contains this sample program in the file rfmtdouble.ec.

Output


INFORMIX-ESQL/C Programmer's Manual, Version 9.21
Copyright © 1999, Informix Software, Inc. All rights reserved