Thanks a lot. Works perfect now. Regards, Payam.
--- [EMAIL PROTECTED] wrote: > I think Payam Fard wrote: > > Thanks for your response. Actually I get the same > > result, but I am really interested in the > run-query to > > return the two Cotradictions in the knowledge > base , > > namely (Contradiction 1 2), (Contradiction 3 4) > > > > rather than > > > > > <External-Address:jess.Fact> > > > <External-Address:jess.Fact> > > > FALSE > > > > Could you advise on how I can change the run-query > to > > print the two contradictions? > > > > In this loop, > > > > Jess> (while (?result hasNext) > > > (bind ?token (call ?result next)) > > > (bind ?fact1 (call ?token fact 1)) > > > (printout t ?fact1 crlf)) > > the variable ?fact1 is bound to each jess.Fact > object, > in turn, that satisfies the query. In the fourth > line, you call > "printout" on it, and the display you see is what > printout does with > Java objects. Instead, you should write whatever > code you need to > display things in the format you'd like. One very > simple possibility > would be to call toStringWithParens() on the Fact, > which will give > you a representation that looks like what (facts) > prints out. So > something like > > (printout t (?fact1 toStringWithParens) > crlf) > as the last line of the loop. > > > > > > > > > > --------------------------------------------------------- > 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] > -------------------------------------------------------------------- > __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -------------------------------------------------------------------- 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] --------------------------------------------------------------------