Hello there 

I am looking for a way to increment a specific value from a fact within
a rule. I have only found the "modify" command for unordered facts.
Exists there also a way to modify ordered facts?

Could you also provide me an example how I could increment a value
"amount" for an unordered fact like this:

(event (type A) (amount 2)) 

My first idea, is like this, but this seems to end in an endless loop.
Could someone tell me why?  
So I think there must exists better ways for a simple incrementation. ;
)
Please show me or just give me some hints.

(defrule incrementtest (event (type A) (amount ?x )) ?id <- (event (type
A) (amount ?x))  => (modify ?id (amount (+ ?x 1)))) 

Thank you in advance

regards
Mark

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