I think =?iso-8859-1?q?Moderator?= wrote:
>
> r.executeCommand("(assert (class (students" + v +
> ")))");
v is a variable that holds a reference to a Value object of type
FACT. Here you're asking Java to call toString() on it, and somehow
expecting this string to end up representing a fact in the assert
command; if you think about it, this clearly can't work.
The Jess manual includes two very detailed sections that describe two
exact solutions to what you're trying to do; I don't have a copy handy
but they're both in the "Library" chapter. One is the section on
exchanging values between Jess and Java (about store() and fetch())
and the other is the section about how to assert facts from Java
directly (i.e., without using executeCommand.) Each presents a
different, equally valid solution to your need.
---------------------------------------------------------
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]
--------------------------------------------------------------------