The ifx_dececvt() and ifx_decfcvt() function
The ifx_dececvt() and ifx_decfcvt() functions are the thread-safe versions of the dececvt() and decfcvt() Informix® ESQL/C library functions.
Syntax
mint ifx_dececvt(np, ndigit, decpt, sign, decstr, decstrlen)
register dec_t *np;
register mint ndigit;
mint *decpt;
mint *sign;
char *decstr;
mint decstrlen;
mint ifx_decfcvt(np, ndigit, decpt, sign, decstr, decstrlen)
register dec_t *np;
register mint ndigit;
mint *decpt;
mint *sign;
char *decstr;
mint decstrlen;
- np
- A pointer to a decimal structure that contains the decimal value to be converted.
- ndigit
- 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
- A pointer to an integer that is the position of the decimal point relative to the beginning of the string. A negative or zero value for *decpt means that the position is located to the left of the returned digits.
- sign
- A pointer to the sign of the result. If the sign of the result is negative, *sign is nonzero; otherwise, it is zero.
- decstr
- The user-defined buffer where the function returns the converted decimal value.
- decstrlen
- The length, in bytes, of the decstr buffer that the user defines.
Usage
The ifx_dececvt() function is the thread-safe version of the dececvt() function. The ifx_decfcvt() function is the thread-safe version of decfcvt() function. Each function returns a character string that cannot be overwritten when two threads simultaneously call the function. For information about how to use dececvt() and decfcvt(), see The dececvt() and decfcvt() functions.
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.