I think Sukesh Patel wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Consider the following example:
> 
> (deftemplate entity
>     (multislot attributes)
> )
> 
> Now consider an extremely simple instance
> 
> (bind ?e (assert (entity (attributes (create$ 1 2 3 4 5 6 7 8 9 10)))))
> 
> I am asking if there is a way to write a Jess rule LIKE:
> 

Not sure what your question is -- if you use proper multifield names
(i.e., $?pre and $?post,) the rule below is fine and behaves just as
your comments indicate it should. I don't know what you're trying to
indicate with the "&*" characters.


> (defrule match-a-seven
>     ?e <- (entity (attributes $&*pre 7 $&*post)) ;;; match an entity whose attribues 
>are pre followed by 7 followed by post
>                                                        ;;; where pre is zero or more 
>elements and post is zero or more elements
>     =>
>     (printout t "Found 7" crlf)
>     (modify ?e (attributes (union$ $&pre $&post)))   ;; update so it need not find 
>it again
> )
> 
> Thanks for any pointers in advance.
> 
> Sukesh Patel
> 



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [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
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to