(defrule biggest-number (number ?number) (not (number ?num2 > ?num))
=> (printout t "biggest number: ") (printout t ?number crlf) ) I think? On 2/1/06, erich.oliphant <[EMAIL PROTECTED]> wrote: > > Hi, > I am trying to figure out the best way to have a rule fire only for a fact > whose slot value is the min or max of a group of facts. > > For example: > (deftemplate number > (slot value)) > > (assert number (value 1)) > (assert number (value 2)) > (assert number (value 3)) > (assert number (value 4)) > > > (defrule biggest-number > (number (value ?val)) > ???? > => > ) > > I only want biggest-number to fire for (number (value 4)). Is a defquery > better here? > > -------------------------------------------------------------------- > 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]