The <- means assign the the variable ?fact the "fact address" of the fact
matched by the pattern (a "retract me").

You can use it on the RHS (right hand side) to retract the fact from the
rete memory.

Depending on which version of jess you are using, the "fact address" may be
different things.

In earlier versions prior to Version 6.0a1 (April 25th, 2000) the ?fact
variable would contain the "id" of the fact. In subsequent versions it has
become the Fact object itself. See the Change Log in the documentation for
further details.

You should read all of the following several times (pick your version):

http://herzberg.ca.sandia.gov/jess/docs/index.html

Also, search through the archives to find answers to common questions:

http://www.mail-archive.com/[email protected]/

Good luck!

alan

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Young-Jin Lee
Sent: Tuesday, September 18, 2001 11:35 AM
To: [EMAIL PROTECTED]
Subject: JESS: question from newbie


Hi, I'm starting learning JESS and I got a question while I was reading the
jess document.
Could any one explain what "<-" means in the following code?
(defrule example-5
    ?fact <- (a "retract me")
    =>
    (retract ?fact))

I tried to look through the jess document, but couldn't find the answer.
I also want to know if there's a good way of starting jess programming. I
mean if there's a kind of tutorial of jess, I could get a better idea.

Thanks in advance.

Young-Jin Lee


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