Thanks for the clarification. That was very prompt.

amit.


[EMAIL PROTECTED] wrote:

I think Amit Chopra wrote:


> defrule resolve-commitment
      (and (?x) (commitment (cond ?x))) => (printout t "resolved" crlf))

Basically I'm trying to match a condition of the commitment (money)
with an event (money). If such an event is found, the commitment is
said to be resolved. I expect ?x to be bound to money when the
rule fires.



You can't do that. The "head" of a fact is a fixed constant like a Java class name; it's not data like the contents of a slot. You can't match the head of a fact (at least not in current versions of Jess.)

This is true for both ordered and unordered facts.

The alternate implementation you proposed is the way to do this.






---------------------------------------------------------
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]
--------------------------------------------------------------------




-------------------------------------------------------------------- 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