I think Roger Studner wrote: > > (deftemplate employee > (slot salary)) > (deffacts employee-facts > (employee (salary 1007700)) > (employee (salary 1002347700)) > (employee (salary 107712000)) > ) > (watch all) > (reset) > > (defrule count-highly-paid-employees > ?c <- (accumulate (bind ?count 0) ;; initializer > (bind ?count (+ ?count 1)) ;; action > ?count ;; result > (employee (salary ?s&:(> ?s 100000)))) ;; CE > => > (printout t ?c " employees make more than $100000/year." crlf)) > > (run) >
Move the "reset" *after* you define the rule (the normal pattern is to define rules, then add data) and it works fine. This shouldn't matter, but it apparently does. Congratulations, you've found a bug! Thanks for the report. --------------------------------------------------------- Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- 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] --------------------------------------------------------------------