I think Udo Dieckmann wrote:
> Thanks again, and you read my mind, because my next question was
> going to be how to encapsulate the info into something called "data".
> I am now using unordered facts with named slots.
> 
> Now, I've got to move on to something a little more complicated.
> 

The best thing to do with this would be to code it as a deffunction,
match the four or five arguments on the rule's LHS, and pass them in:

(deffunction areTenPercentAffected(?a ?b ?c ?d) ...)

(defrule do-something-if-ten-percent-affected
  (data (value1 ?v1) (value2 ?v2))
  (otherdata (value1 ?v3) (value2 ?v4))
  (test (areTenPercentAffected ?v1 ?v2 ?v3 ?v4))
  =>
  (whatever))

Make sense? This is pretty much what you do in Java, too.


---------------------------------------------------------
Ernest Friedman-Hill  
Science and Engineering PSEs        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]
--------------------------------------------------------------------

Reply via email to