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

ifx_int8toint()

The ifx_int8toint() function converts an int8 type number into a C int type number.

Syntax

Usage

The ifx_int8toint() library function converts an int8 value to a C integer. The size of a C integer depends upon the hardware and operating system of the computer you are using. Therefore, the ifx_int8toint() function equates an integer value with the SQL SMALLINT data type. The valid range of a SMALLINT is between 32767 and -32767. To convert larger int8 values to larger integers, use the ifx_int8tolong() library function.

Return Codes

0 The conversion was successful.
<0 The conversion failed.

Example

The file int8toint.ec in the demo directory contains the following sample program.

Output


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