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

Reply via email to