I think Srini wrote: > Hi, > Can a deftemplate be slot or multislot in another deftemplate?
Remember that a deftemplate is like a class, whereas a fact is like an object. It is the slots of facts that contain things. And indeed, any slot in a fact can contain a reference another fact object. (bind ?f1 (assert (X (name n1))) (bind ?f2 (assert (X (name n2))) (bind ?f3 (assert (XElements (element1 ?d1) (element2 ?f2))) (assert (X1 (name n3) (XElements ?f3))) But you don't have to (nor can you) declare this in any way in the deftemplate -- you just do it. --------------------------------------------------------- Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- 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] --------------------------------------------------------------------
