Hello all,

I want to calculate expressions in the left hand side of a JESS rule
and bind these expressions to variables so that I can refer to
these variables in the right hand side of the rule. Is this possible?

Example:
(defrule Test
  (GROSS (VALUE ?g))
  (COST (VALUE ?c))
  (test (<= (- ?g ?c) 1000))
=>
  (printout t  (- ?g ?c) crlf)

I would like to bind (-?g ?c) to a variable (say ?r) in the left hand
side and then use that variable in  (test (<= ?r 1000)) and also
(printout t ?r crlf).

I know that I can use the 'bind' function in the RHS of a rule but have
been unsuccessful using it
in the LHS of a rule. I'm sure someone has done this before. I'm new to
JESS and expert systems
and can't find how to do this in the JESS documentation.

Thank you. This mail group has been very helpful in getting me aquainted
with JESS.

mike


---------------------------------------------------------------------
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]
---------------------------------------------------------------------

Reply via email to