Re: JESS: Getting a handle to the fact that matched given pattern

2004-05-27 Thread ejfried
I think Amit Chopra wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] (defrule foo-res (foo (name ?x)) = (call 'fact that matched' assign)) I want to know how to find 'fact that matched' to be able to call assign on it. OK, two things. First, to get a reference to the

RE: JESS: Getting a handle to the fact that matched given pattern

2004-05-27 Thread Jason Morris
Amit, I just did something like this yesterday First I wrote a defquery as you suggested: (defquery find-foo-by-name (declare (variables ?name)) (foo (name ?name))) This returns an iterator of all foos with the given name Now, I added a function to wrap the query: (deffunction

RE: JESS: Getting a handle to the fact that matched given pattern

2004-05-27 Thread Jason Morris
Oops... I may have misunderstood your question. Sorry... completely mixed up my code. Disregard that last suggestion. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Amit Chopra Sent: Thursday, May 27, 2004 10:58 AM To: [EMAIL PROTECTED] Subject:

Re: JESS: Getting a handle to the fact that matched given pattern

2004-05-27 Thread Amit Chopra
Ernest and Jason, Thanks for replying, that should be adequate. amit. [EMAIL PROTECTED] wrote: I think Amit Chopra wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] (defrule foo-res (foo (name ?x)) = (call 'fact that matched' assign)) I want to know how to find 'fact that