I am trying to bind a slot to global variable but doesn't seem to work.
I have tried the below but the rules I created don't work.
*(defrule getusermalinfo
(user (usinfo ?usr))
=>
(bind ?usr ?*degreeofyes*)
)*
After, I want to use the slot value to make some decisions. Like the rule below:
*(defrule not-likely
(user {usinfo <= 10})
=>
(printout t "Not suffering from Kwashiorkor" crlf)
)*
One cannot use (bind) for modifying a fact's slot values. You need to use (modify), something like this:
Note, however, that you may have to add something to the LHS of this rule to select some specific user fact and/or avoid repeated firing of this rule after the modification.