QXXPTOD() — パック 10 進数から double への変換
形式
#include <xxcvt.h>
double QXXPTOD(unsigned char *pptr, int digits, int fraction);言語レベル
ILE C Extension
スレッド・セーフ
はい
説明
QXXPTOD 関数は、パック 10 進数を double に変換します。
例
#include <xxcvt.h>
#include <stdio.h>
int main(void)
{
unsigned char pptr[10];
int digits = 8, fraction = 6;
double value = 6.123456, result;
/* First convert an integer to a packed decimal,*/
QXXDTOP(pptr, digits, fraction, value);
/* then convert it back to a double. */
result = QXXPTOD(pptr, digits, fraction);
/* result = 6.123456 */
}