Actually, Jess 5 doesn't support the "or" conditional element -- it support "test" just fine.
You can upgrade to Jess 6 to get support for the "or" conditional element. In the case below, though, you can simply rewrite the rule to use the "or" logical function instead, putting the "or" inside the "test" instead of outside: (defrule rule1 (person ?age) (test (or (> ?age 60) (< ?age 10))) => (printout t ?age crlf) ) or, of course, eschewing the "test" CE altogether: (defrule rule1 (person ?age&:(or (> ?age 60) (< ?age 10))) => (printout t ?age crlf) ) I think x xu wrote: > Sorry about the previous post. Actually I have > problems > to define the following rule: > > (defrule rule1 > (person ?age) > (or (test (> ?age 60)) (test (< ?age 10)) ) > => (printout t ?age crlf) > ) > > I always get "Bad slot value" error, so I thought > maybe Jess doesn't support (test) function. > Thanks. > > Xiangjun Xu > > __________________________________________________ > Do You Yahoo!? > Find the one for you at Yahoo! Personals > http://personals.yahoo.com --------------------------------------------------------- Ernest Friedman-Hill Distributed Systems Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 Org. 8920, MS 9012 [EMAIL PROTECTED] PO Box 969 http://herzberg.ca.sandia.gov Livermore, CA 94550 -------------------------------------------------------------------- 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] --------------------------------------------------------------------
