Is it correct that it isn't possible to bind the entire value of a
multislot to a variable *and* use some list pattern to restrict the
facts at the same time? Consider:
(deftemplate AE (multislot ae))
(deffacts facts
(AE (ae a b c d e))
(AE (ae b c d e a))
(AE (ae e d c b a))
)
(defrule Rule
?fae <- (AE (ae $?msae & $? b c $? ))
=>
(printout t "match: " ?msae crlf)
)
(reset)
Jess> (run)
match: ()
match: (a)
2
All the '&' achieves is that both $?msae and the anonymous $? are bound
to the sublist preceding b-c.
It's possible to work around this restriction: A predicate can be
written to test for the pattern, such as, e.g. (ae $?msae &:(test-bc
?msae)).
Wolfgang
--------------------------------------------------------------------
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]
--------------------------------------------------------------------