JESS: [EXTERNAL] Matching facts based on a slot, but not the fact's type

2013-07-30 Thread Aurelien Mazurie
Dear Jess users, I am still learning the ropes, and cannot find an answer to the following question either online or in the 'Jess in action' book. Is there a way to match facts in a LHS based on the presence of a slot? For example, I have two templates: (deftemplate A (slot score)) (deftemplate

RE: JESS: [EXTERNAL] Matching facts based on a slot, but not the fact's type

2013-07-30 Thread Friedman-Hill, Ernest
The short answer is no. Templates are like Java classes, and so this is akin to asking if you can write Java code that reads the value of a score member variable in any class. But you can use template inheritance to achieve your goal. Templates can extend other templates; just put your score