handle right cases where both argumnets to number_ are bound.
This commit is contained in:
parent
b316710db5
commit
0e9a98fa30
@ -1937,7 +1937,7 @@ p_number_chars(void)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (IsNonVarTerm(t1)) {
|
if (IsNonVarTerm(t1) && IsVarTerm(t)) {
|
||||||
Term NewT;
|
Term NewT;
|
||||||
if (!IsNumTerm(t1)) {
|
if (!IsNumTerm(t1)) {
|
||||||
Yap_Error(TYPE_ERROR_NUMBER, t1, "number_chars/2");
|
Yap_Error(TYPE_ERROR_NUMBER, t1, "number_chars/2");
|
||||||
@ -2147,7 +2147,7 @@ p_number_codes(void)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (IsNonVarTerm(t1)) {
|
if (IsNonVarTerm(t1) && IsVarTerm(t)) {
|
||||||
if (IsIntTerm(t1)) {
|
if (IsIntTerm(t1)) {
|
||||||
#if SHORT_INTS
|
#if SHORT_INTS
|
||||||
sprintf(String, "%ld", IntOfTerm(t1));
|
sprintf(String, "%ld", IntOfTerm(t1));
|
||||||
|
Reference in New Issue
Block a user