SWI not evaluating expression
- From: michael.goodrich@xxxxxxxxx
- Date: 15 Sep 2006 09:17:19 -0700
O.K. this one has me stumped.
Been using SWI a lot but this is suddenly new:
foo :-
R1 is R-1,
C1 is C-1,
get_m(R1,C1,(Xul_ll,Xul_ul,Xul_ur)),
get_m(R,C1,(Xln_ll,Xln_ul,Xln_ur)),
get_m(R1,C,(Xun_ll,Xun_ul,Xun_ur)),
q(Qs),d(Ds),
nth1(R,Qs,Qr), nth1(C,Ds,Dc),
score(Qr,Dc,Z),
MxA1 is max(Xul_ll,Xul_ul), MxA is max(Xul_ur,MxA1),
S_ul is Z+MxA,
gap_open(Go),
gap_xtnd(Ge),
gap(1,Gp),
Tba is Xln_ul - Gp,
Tbb is Xln_ll - Gp,
Tbc is Xln_ur - Ge,
MxB1 is max(Tba,Tbb), S_ur is max(Tbc,MxB1),
Tca is Xun_ul-Gp,
Tcb is Xun_ll-Ge,
Tcc is Xun_ur-Gp,
MxC1 is max(Tca,Tcb), S_ll is max(Tcc,MxC1),
assert(m(R,C,(S_ll,S_ul,S_ur))).
.... and SWI doesn't want to *calculate* a number for 'Tba' but wants to
store it as an arithmetic expression instead.
What's up with that?
Been using 'is' extensively in many other progs just like the above,
but haven't seen this one.
Help is appreciated.
M.
.
- Follow-Ups:
- Re: SWI not evaluating expression
- From: Markus Triska
- Re: SWI not evaluating expression
- Prev by Date: SWI-Prolog : MySQL handle as global variable?
- Next by Date: Does first argument indexing still work if the first argument is a string?
- Previous by thread: SWI-Prolog : MySQL handle as global variable?
- Next by thread: Re: SWI not evaluating expression
- Index(es):