![]() |
|
The dectoint() function converts a decimal type number into a C int type number.
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.
0 | The conversion was successful. |
<0 | The conversion failed. |
-1200 | The magnitude of the decimal type number is greater than 32767. |