I think Nik wrote:
> Hi all,
>
> This seems like a rather trivial question, but I cannot find a way to print out a
>single
> fact. I don't want to print out all facts using (facts), I just want to be able to
>print
> out a single fact with something like (ppfact <fact-id>). Or even better would be a
> recursive function that would print out a fact, and any fact within that fact.
>
> - Nik.
>
To print one fact, you can just say
Jess> (bind ?f (assert (foo 1 2 3)))
<Fact-0>
Jess> (printout t (?f toString) crlf)
(MAIN::foo 1 2 3)
To print out the nested ones, you'd have to define precisely what you
wanted it to look like, and then write a function to do it (using the
various methods of the jess.Fact class.) There's no built-in way to
accomplish what you want there.
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://herzberg.ca.sandia.gov
--------------------------------------------------------------------
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]
--------------------------------------------------------------------