Jess is a rule language whose basic mechanism is pattern matching, which binds pattern variables to constants. If you have a fact of the form
(person (name Fred) (age 22)) then you can issue a query of the form (person (name ?name) (age ?age)) and it will bind ?name to Fred and ?age to 22 (if Fred is the only person in your database). You can do this with a defQuery or a rule. As you're new to Jess, you really ought to work your way through some of the tutorial material available, as Jess (and rule engines in general) operate quite differently from conventional programming languages. You can learn quite a lot from the Jess manual in a few hours of poking around. -John -----Original Message----- From: alvin0618 [mailto:[email protected]] Sent: Monday, November 22, 2010 9:47 AM To: [email protected] Subject: JESS: Get fact's slot value (deftemplate person (slot name (type STRING)) (slot age (type INTEGER))) (bind ?new (assert (person (name Fred) (age 22)))) ================================================= The question is how do i get the binded fact's slot value, name and age??? Could any provide help to me~ I'm new in JESS language -- View this message in context: http://old.nabble.com/Get-fact%27s-slot-value-tp30279338p30279338.html Sent from the Jess mailing list archive at Nabble.com. -------------------------------------------------------------------- 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]. -------------------------------------------------------------------- -------------------------------------------------------------------- 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]. --------------------------------------------------------------------
