Thanks.  Is there a way to do this with onordered facts?


[EMAIL PROTECTED] writes:
 > 
 > 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.



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