Hi
 
I've got the following problem with accumulate-CE. The following code works fine:
 
(clear)
 
(deftemplate smth
 (slot anyth)
)
 
(deffacts facts
 (smth (anyth "x"))
 (smth (anyth "y"))
)
 
(defrule rule
  ?data <- (accumulate
    (bind ?result (create$))
    (bind ?result
      (create$ ?result ?anyth)
    )
    ?result
;    (and
      (smth
        (anyth ?anyth)
      )
;    )
  )
  =>
  (printout t ?data crlf)
)
 
(reset)
 
But when I enable the and-CE Jess reports an 'Error during execution'.
 
Another question on accumulate-CE: is it possible to return more then one variable as a result? E.g. in the preceding example I may need to query values of several slots (anyth2, anyth3 etc.). Of course I may use implode$ and put them in one list but this makes things too complex.
 
Yuri

Reply via email to