informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

dectoint()

The dectoint() function converts a decimal type number into a C int type number.

Syntax

Usage

The dectoint() library function converts a decimal value to a C integer. The size of a C integer depends on the hardware and operating system of the computer you are using. Therefore, the dectoint() 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 decimal values to larger integers, use the dectolong() library function.

Return Codes

0 The conversion was successful.
<0 The conversion failed.
-1200 The magnitude of the decimal type number is greater than 32767.


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved