Hi all, I made a simple example to training in Jess and something interesting has occurred. See below...
=================== (deftemplate id(slot name)(slot lastname)) (defrule regra-01 ?fact <- (id(name mary)(lastname dechamps)) => (store name "dechamps, mary") (retract ?fact) (assert (id(name dechamps)(lastname mary))) ... ) (defrule regra-02 ?fact <- (id(name ?n)(lastname ?ln)) => (retract ?fact) (assert (id(name ?ln)(lastname ?n))) ... ) (defrule increment ?cont <- (counter ?c&~10) => (bind ?new-c (+ ?c 1)) (assert (counter ?new-c)) (printout t "counter now is " ?new-c crlf) (retract ?cont) ) (defrule end_of_execution (counter 10) => (halt) ) (assert (id(name mary)(lastname dechamps))) (assert (id(name desireh)(lastname fronchaw))) (assert (id(name carmen)(lastname morris))) (assert (counter 0)) (run) =================== The problem is: Only [increment] and [end-of-execution] fires. The rule1 and rule2 don�t fires any time. What happens? What I forgot? Thanks for help! --------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] ---------------------------------------------------------------------
