That's right. More generally, the point is that pattern matching is
driven by assertions, retractions, and modifications to working
memory -- changes to facts. Changing a defglobal will not cause a
match to be reconsidered. But if there were a fact being matched
*before* the "test" pattern, then when that fact changed, the global
would be re-checked.
On Mar 29, 2008, at 9:10 AM, ANA TANASESCU wrote:
> Hye,
>
> I have read your message and I looked a little in my documentation
> about Jess.
> In the book Jess in Action the author has written about Matching
> global variables the followings:
>
> "If you match to a defglobal with a pattern like (score ?*x*), the
> match only considers the value of the defglobal when the fact is
> first asserted. Subsequent changes to the defglobal’s value will
> not invalidate the match—if the rule was activated based on the
> value of the defglobal, it stays activated even if the defglobal’s
> value changes. The match does not reflect the current value of the
> defglobal, but only the value at the time the matching fact was
> asserted."
>
> I hope you will find a solution for your problem.
>
> Ana Tanasescu
>
> Never miss a thing. Make Yahoo your homepage.
---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
PO Box 969, MS 9012
ejfried@...
Livermore, CA 94550
http://www.jessrules.com--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users
you@...'
in the BODY of a message to
majordomo@..., NOT to the list
(use your own address!) List problems? Notify
owner-jess-users@....
--------------------------------------------------------------------