typ.size aware OPV.Convert

This commit is contained in:
David Brown 2016-08-21 14:59:11 +01:00
parent 731f2215aa
commit 02803ae1fb
16 changed files with 96 additions and 232 deletions

View file

@ -89,8 +89,8 @@ void Reals_ConvertL (LONGREAL x, INTEGER n, CHAR *d, LONGINT d__len)
}
k = 0;
if (n > 9) {
i = __ENTIER(x / (LONGREAL)(LONGREAL)1000000000);
j = __ENTIER(x - i * (LONGREAL)1000000000);
i = (LONGINT)__ENTIER(x / (LONGREAL)(LONGREAL)1000000000);
j = (LONGINT)__ENTIER(x - i * (LONGREAL)1000000000);
if (j < 0) {
j = 0;
}
@ -100,7 +100,7 @@ void Reals_ConvertL (LONGREAL x, INTEGER n, CHAR *d, LONGINT d__len)
k += 1;
}
} else {
i = __ENTIER(x);
i = (LONGINT)__ENTIER(x);
}
while (k < (LONGINT)n) {
d[__X(k, d__len)] = (CHAR)(__MOD(i, 10) + 48);