QXXDTOP() — Convert Double to Packed Decimal
Format
#include <xxcvt.h>
void QXXDTOP(unsigned char *pptr, int digits, int fraction,
double value);
Language Level
ILE C Extension
Threadsafe
Yes
Description
The QXXDTOP function converts the double value specified in value to a packed decimal number with digits total digits, and fraction fractional digits. The result is stored in the array pointed to by pptr.
Example
#include <xxcvt.h>
#include <stdio.h>
int main(void)
{
unsigned char pptr[10];
int digits = 8, fraction = 6;
double value = 3.141593;
QXXDTOP(pptr, digits, fraction, value);
}
Related Information
- 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
- QXXZTOI() — Convert Zoned Decimal to Integer