I think Mark Nahabedian wrote: > > I have several predicate/templates that share certain behavior. I'd > like to exopress this through shared code... Is there some way of > doing this in Jess? For example, can I use a variable in the first > element of a template ...
This is a planned feature for Jess version 7, now on the drawing board. Until then, you can try using fact inheritance to factor out the common parts of your templates. (deftemplate two-slotted-thing (slot a) (slot b)) (deftemplate thing1 extends two-slotted-thing) (deftemplate thing2 extends two-slotted-thing) (defrule do-something (two-slotted-thing (a 1) (b 2)) => ) This rule would fire for both thing1 and thing2 facts. --------------------------------------------------------- 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] --------------------------------------------------------------------
