Hi David,

You can express this using the member$ function:

    ?f1 <- (abc (items $?list&:(not (member$ x $?list))))


I think David Thureson wrote:
> 
> I'm having trouble with a pattern conditional element.
> Hopefully someone will spot the answer in a second, and if
> so I would really appreciate any advice.
> 
> If I try to match on every fact "abc" where "x" is an
> element in the multislot "items", this works:
> 
>           ?f1 <- (abc (items $? x $?))
> 
> But I can't figure out how to match on every fact "abc"
> where "x" is _not_ an element.  I've read both the Jess
> readme and the CLIPS manual, and tried various combinations
> of "~" and "NOT", but I can't get anything that compiles.
> 
> Here's a file that reproduces my situation in the simplest
> possible form, with the line in question highlighted.
> 
> ------------------------------------------
> 
> (watch all)
> 
> (deftemplate abc
>   (multislot items)
> )
> 
> (defrule rule1
> 
> ;===========================================================
>   ;The following works.  The question is, how do you negate
> it?
>   ?f1 <- (abc (items $? x $?))
> 
> ;===========================================================
>   =>
> )
> 
> (defrule startup ""
>   =>
>   (assert (abc (items x)))
>   (assert (abc (items y)))
>   (assert (abc (items x y)))
>   (assert (abc (items y x)))
> )
> 
> (reset)
> (run)
> 
> ------------------------------------------
> 
> Thanks for any advice.
> 
> -- David Thureson
> -- [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. List problems? Notify [EMAIL PROTECTED]
> ---------------------------------------------------------------------
> 
> 


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9214                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to