QXXZTOI() — Convert Zoned Decimal to Integer
Format
#include <xxcvt.h>
int QXXZTOI(unsigned char *zptr, int digits, int fraction);
Language Level
ILE C Extension
Threadsafe
Yes
Description
The QXXZTOI function converts to an integer, the zoned decimal number (with digits total digits, and fraction fractional digits) pointed to by zptr. The resulting integer is returned.
Example
#include <xxcvt.h>
#include <stdio.h>
int main(void)
{
unsigned char zptr[] = "000111115";
int digits = 9, fraction = 0, result;
result = QXXZTOI(zptr, digits, fraction);
/* result = 111115 */
}
Related Information
- QXXDTOP() — Convert Double to Packed Decimal
- QXXDTOZ() — Convert Double to Zoned Decimal
- QXXITOP() — Convert Integer to Packed Decimal
- QXXITOZ() — Convert Integer to Zoned Decimal
- QXXPTOD() — Convert Packed Decimal to Double
- QXXPTOI() — Convert Packed Decimal to Integer
- QXXZTOD() — Convert Zoned Decimal to Double