allow float matrix to be initialised with ints.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2098 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
df0a199afb
commit
6d4edaa609
@ -264,11 +264,14 @@ cp_float_matrix(YAP_Term tl,YAP_Term matrix)
|
||||
return FALSE;
|
||||
}
|
||||
th = YAP_HeadOfTerm(tl);
|
||||
if (!YAP_IsFloatTerm(th)) {
|
||||
if (YAP_IsIntTerm(th)) {
|
||||
d = YAP_IntOfTerm(th);
|
||||
} else if (!YAP_IsFloatTerm(th)) {
|
||||
/* ERROR */
|
||||
return FALSE;
|
||||
} else {
|
||||
d = YAP_FloatOfTerm(th);
|
||||
}
|
||||
d = YAP_FloatOfTerm(th);
|
||||
j[i] = d;
|
||||
tl = YAP_TailOfTerm(tl);
|
||||
}
|
||||
|
Reference in New Issue
Block a user