QXXZTOD() — Convert Zoned Decimal to Double
Format
#include <xxcvt.h>
double QXXZTOD(unsigned char *zptr, int digits, int fraction);
Language Level
ILE C Extension
Threadsafe
Yes
Description
The QXXZTOD function converts to a double, the zoned decimal number (with digits total digits, and fraction fractional digits) pointed to by zptr. The resulting double value is returned.
Example
#include <xxcvt.h>
#include <stdio.h>
int main(void)
{
unsigned char zptr[] = "06123456";
int digits = 8, fraction = 6;
double result;
result = QXXZTOD(zptr, digits, fraction);
/* result = 6.123456 */
}
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
- QXXZTOI() — Convert Zoned Decimal to Integer