Hi Kimos: I'm learning Jess, too! One thing that I do to avoid errors with (Rete) executeCommmand() is to build a command string first. This way I can do a "sanity check" on its components before using it in executeCommand().
A StringBuffer works nicely... for example: Rete engine = new Rete(); StringBuffer cmd = new StringBuffer(); cmd.append("(assert "); cmd.append(getString()); //A call to your other method somewhere - returns a fact head at least I assume cmd.append(")"); engine.executeCommand(cmd.toString()); A bit more code, but for some complex commands, it pays off. However, if you are wanting a fact asserted from your getstring() method, you don't need to use executeCommand(). Just use the (Rete) engine.assertString() method. Rete engine = new Rete(); engine.assertString(getstring()); //Again, whatever you return from getstring() better be at least "(fact-head)" Hope this helps! -JM ------------------------ Jason Morris Morris Technical Solutions [EMAIL PROTECTED] www.morristechnicalsolutions.com fax/phone: 503.692.1088 > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of [EMAIL PROTECTED] > Sent: Thursday, May 27, 2004 2:32 AM > To: [EMAIL PROTECTED] > Subject: JESS: calling an integer or a string > > > > > hi there, > > > first i want to thanks Ernest Friedman-Hill for helping me and > everyone in the > mailing list. you are a great help. > > ok here is my quastion: > > i have an string and i want to call it in the assert while > executioncommand > > r.executeCommand("(assert (i-have-moved))"); << this is what i > have and i want > it > > r.executeCommand("(assert (getstring()))"); > its simple quastion i hope. i readed the doc's but it didnt helped > > i think its something with call but im a newbie > thanks alot > Kimos > > -------------------------------------------------------------------- > 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] > -------------------------------------------------------------------- > -------------------------------------------------------------------- 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] --------------------------------------------------------------------