Hello,
I try to write a rule to compare values in two slot but it does not fire. See
the jess code below. Can anyone point me the issue or a better way to do it?
Thanks a lot!
Andrew
Jess> (reset)
TRUE
Jess> (deftemplate t (slot a ) (slot b) (slot c) (slot d))
TRUE
Jess> (assert (t (a 5) (b 4) (c 3) (d 2))
)
<Fact-1>
Jess> (defrule rl
(a ?a)
(b ?b&:(> ?a ?b))
(d ?d)
(or
(c ?c&:(> ?c ?d))
(test (> ?b ?d))
)
=>
(printout t "test" crlf)
)
TRUE
Jess> (facts)
f-0 (MAIN::initial-fact)
f-1 (MAIN::t (a 5) (b 4) (c 3) (d 2))
For a total of 2 facts in module MAIN.
Jess> (run)
0
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1