Number equality test fails in CLIPS pattern matching?
I have this following rule in my CLIPS file: (defrule check-final (declare (salience 12)) ?scnt <- (set-count (value ?v) (class ?c)) (test (= ?v ?*total*)) => (printout T ?*total* " == " ?v crlf) ) And I get the following strange output: CLIPS>(run) 14 == 9 5 == 2 How is this possible ???? Pattern matching for this rule occurs whenever the fact set-count is asserted or modified. The rule is fired some time afterwards, during the call to run . These two processes can be widely separated in time. The value of ?*v* can of course change during that long period of time. The key is to realize that