The ifx_int8cvasc() function

The ifx_int8cvasc() function converts a value held as printable characters in a C char type into an int8 type number.

Syntax

mint ifx_int8cvasc(strng_val, len, int8_val)
   char *strng_val
   mint len;
   ifx_int8_t *int8_val;
strng_val
A pointer to a string.
len
The length of the strng_val string.
int8_val
A pointer to an int8 structure to contain the result of the conversion.

Usage

The character string, strng_val, can contain the following symbols:
  • A leading sign, either a plus (+) or minus (-)
  • An exponent that is preceded by either e or E

    You can precede the exponent by a sign, either plus (+) or minus (-).

The strng_val character string must not contain a decimal separator or digits to the right of the decimal separator. The ifx_int8svasc() function truncates the decimal separator and any digits to the right of the decimal separator. The ifx_int8svasc() function ignores leading spaces in the character string.

When you use a nondefault locale (one other than U.S. English), ifx_int8svasc() supports non-ASCII characters in the strng_val character string. For more information, see the Informix® GLS User's Guide.

Return values

0
The conversion was successful.
-1213
The string has non-numeric characters.
-1284
The operation resulted in overflow or underflow.