I think Scott Graham wrote: > (bind ?arrayList (new java.util.ArrayList))
The problem is that ?arrayList is a local variable at the command prompt's scope. It's not visible from rules. You could use a defglobal instead: (set-reset-globals FALSE) ;; See documentation for this function (defglobal ?*arrayList* = (new java.util.ArrayList)) > > (defrule r1 > (mother-of (mother "Anna") (child $?child)) > => > (?arrayList add $?child) > ) > --------------------------------------------------------- Ernest Friedman-Hill Distributed Systems 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] --------------------------------------------------------------------
