The ifx_int8toasc() function
The ifx_int8toasc() function converts an int8 type number to a C char type value.
Syntax
mint ifx_int8toasc(int8_val, strng_val, len)
ifx_int8_t *int8_val;
char *strng_val;
int len;
- int8_val
- A pointer to the int8 structure that contains the value to convert to a text string.
- strn_val
- A pointer to the first byte of the character buffer to contain the text string.
- len
- The size of strng_val, in bytes, minus 1 for the null terminator.
Usage
If the int8 number does not fit into a character string of length len, ifx_int8toasc() converts the number to an exponential notation. If the number still does not fit, ifx_int8toasc() fills the string with asterisks. If the number is shorter than the string, ifx_int8toasc() left justifies the number and pads it on the right with blanks.
Because the character string that ifx_int8toasc() returns is not null terminated, your program must add a null character to the string before you print it.
When you use a nondefault locale (one other than U.S. English), ifx_int8toasc() supports non-ASCII characters in the strng_val character string. For more information, see the HCL OneDB™ GLS User's Guide.
Return values
- 0
- The conversion was successful.
- -1207
- The converted value does not fit into the allocated space.