Format
#include <xxcvt.h> int QXXPTOI(unsigned char *pptr, int digits, int fraction);
Language Level: ILE C Extension
Threadsafe: Yes.
Description
The QXXPTOI function converts a packed decimal number to an integer.
Example that uses QXXPTOI()
#include <xxcvt.h> #include <stdio.h> int main(void) { unsigned char pptr[10]; int digits = 3, fraction = 0, value = 104, result; /* First convert an integer to a packed decimal,*/ QXXITOP(pptr, digits, fraction, value); /* then convert it back to an integer. */ result = QXXPTOI(pptr, digits, fraction); /* result = 104 */ }
Related Information
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.