ifx_dececvt()
Thread-safe version of the dececvt() ESQL/C function
ifx_decfcvt()
Thread-safe version of the decfcvt() ESQL/C function
Both of these functions convert a decimal value to an ASCII string and return it in the user-defined buffer. When you compile your ESQL/C program with the -thread command-line option of the esql command, esql automatically links these functions to your program. These functions are described on the following pages. ifx_dececvt(), ifx_decfcvt() The ifx_dececvt() and ifx_decfcvt() functions are the thread-safe versions of the dececvt() and decfcvt() ESQL/C library functions. Syntax
np
is a pointer to a decimal structure that contains the decimal value to be converted.
ndigit
is the length of the ASCII string for ifx_dececvt(). It is the number of digits to the right of the decimal point for ifx_decfcvt().
decpt
is a pointer to an integer that is the position of the decimal point relative to the beginning of the string. A negative value for *decpt means the position is located to the left of the returned digits.
sign
is a pointer to the sign of the result. If the sign of the result is negative, *sign is nonzero; otherwise, it is zero.
decstr
is the user-defined buffer where the function returns the converted decimal value.
decstrlen
is the length, in bytes, of the decstr buffer that the user defines.
Return Codes
0
The conversion was successful.
<0
The conversion was not successful.
-1273
Output buffer is null or too small to hold the result.