On Mar 18, 2007, at 10:43 PM, ricktee wrote:

(store FOOTWEAR (user-footwear (ident soccer-boots)))           )


This line will throw an exception when you run it, because you're calling a (non-existent) function "user-footwear" and passing the result of a call to (another non-existent function) "ident" as an argument.

If you want to fetch the symbol "soccer-boots", then that's what you should store:

(store FOOTWEAR soccer-boots)

Then in Java,

String footwear = engine.fetch("FOOTWEAR").stringValue(null);

or perhaps just

String footwear = engine.fetch("FOOTWEAR").toString();

(of course, either of these will give a NullPointerException in the case where there's no recommendation at all, so be careful.)


---------------------------------------------------------
Ernest Friedman-Hill
Advanced Software Research          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550                 http://www.jessrules.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]
--------------------------------------------------------------------

Reply via email to