The rule can be as follows:
(defrule fight-rule-8
(relation
(r_object ?VALUE)
(r_relation ?VALUE))
=>
(assert (update-control 25))
In the above rule when you use same variable name (?VALUE) for both the
properties, JESS makes sure that both the properties have same value.
Thanks & Regards
Subrahmanyam
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of M Ismail
Sent: Tuesday, March 06, 2007 6:51 PM
To: [email protected]
Subject: JESS: if operator
Hi,
Its simple question but i cant find how:
i have the following template:
(deftemplate relation
(slot r_id)
(slot r_object)
(slot r_relation)
(slot r_subject)
(slot r_is_visible)
(slot r_makes_sound)
(slot r_sound_volume)
)
and i want to define a rule like the following:
(defrule fight-rule-8
(if r_object == r_relation)
=>
(assert (update-control 25))
i tried:
(if (relation (r_object = r_subject))) but it doesnt work
can someone help me?
thanks in advance,
M.Ismail
_________________________________________________________________
Profiteer van de nieuwe, fantastische voordelen van Live Mail!
http://imagine-windowslive.com/mail/launch/default.aspx?Locale=nl-nl
--------------------------------------------------------------------
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]
--------------------------------------------------------------------