I'm not sure if this answers your question, but a slot can hold a reference (actually, id) of another fact asserted into working memory, but typically does not hold an actual fact.
For example: Jess> (clear) TRUE Jess> (deftemplate Living_Thing) TRUE Jess> (deftemplate Injury) TRUE Jess> (deftemplate Person extends Living_Thing (slot ID (type integer)(default 1))(slot inj)) TRUE Jess> (assert (Person (inj (assert (Injury))))) <Fact-1> Jess> (facts) f-0 (MAIN::Injury) f-1 (MAIN::Person (ID 1) (inj <Fact-0>)) For a total of 2 facts in module MAIN. Jess> As you can see, the Person fact references the Injury fact asserted seperately into working memory. I hope this helps. -Mitch -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of portalguy Sent: Wednesday, December 29, 2004 9:39 AM To: [email protected] Subject: JESS: Slot type is another template Hi, I'm trying to define a slot with a type of another template, for example below i have 3 templates and i want "Person" template to have a slot called "inj" and type "Injury". (deftemplate Living_Thing) (deftemplate Injury) (deftemplate Person extends Living_Thing (slot ID (type integer) (default 1)) (slot inj (type Injury)) ) Any help is appreciated. Thanks -------------------------------------------------------------------- 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] -------------------------------------------------------------------- -------------------------------------------------------------------- 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] --------------------------------------------------------------------
