RE: JESS: calling a method on a matched shadow fact

2007-01-15 Thread Skeptic 2000
Hi, In the LHS of a rule, could I bind to a variable a object that is returned from a method called on a matched fact ? (rule x (theShadowfact ?o) (... ?o getXYZ ... ) The purpose of doing this is to have a variable on which to do some tests without having to call getXYZ for each one of th

Re: JESS: calling a method on a matched shadow fact

2007-01-15 Thread Ernest Friedman-Hill
One way to do this would be to use "progn" in a test CE: (defrule x (theShadowFact (OBJECT ?o)) (test (progn (bind ?xyz (?o getXYZ)) (and (> ?xyz 10) (< ?xyz 100 => ... "progn" executes all the function calls inside it, then returns the value of the