The latter is only guaranteed to work for one s-expression, as the
Javadoc says; the former will work for any number of expressions. As
Chad knows, right now, in Jess 6, executeCommand is implemented pretty
much using the exact code shown below, but it hasn't always been, and
might not always be...
This is kind of like the difference between "build" and "eval", which
technically are different, although currently they're implemented
using the same code.
I think Chad Loder wrote:
> Hi. What's the difference between :
>
> jess.Rete r = ...
> java.io.StringReader sr = new StringReader(myRulesAsAString);
> jess.Jesp j = new Jesp(sr, r);
> jess.Value valueOfLastParsedExpression = j.parse(false);
>
> and simply:
>
> jess.Rete r = ...
> r.executeCommand(myRulesAsAString);
>
> Thanks,
> Chad
>
> At Wednesday 9/19/2001 05:20 PM -0700, you wrote:
>
> >Yup. Use a StringReader as input to a jess.Jesp object:
> >
> > jess.Rete r = ...
> > java.io.StringReader sr = new StringReader(myRulesAsAString);
> > jess.Jesp j = new Jesp(sr, r);
> > jess.Value valueOfLastParsedExpression = j.parse(false);
> >
> >
> >
> >I think John Mela wrote:
> >[Charset iso-8859-1 unsupported, filtering to ASCII...]
> > > My java code generates multiple Jess rules as a String. I want
> > > to perform the equivalent of
> > >
> > > rete.executeCommand("(batch xyz.clp)");
> > >
> > > except that I don't want to write out the string to a .clp file [for
> > > obvious performance reasons].
> > >
> > > Is there any way of doing this?
> > >
> > > tia,
> > >
> > > John Mela
> > >
> >
> >
> >
> >
> >---------------------------------------------------------
> >Ernest Friedman-Hill
> >Distributed Systems Research Phone: (925) 294-2154
> >Sandia National Labs FAX: (925) 294-2234
> >Org. 8920, MS 9012 [EMAIL PROTECTED]
> >PO Box 969 http://herzberg.ca.sandia.gov
> >Livermore, CA 94550
> >
> >---------------------------------------------------------------------
> >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]
> ---------------------------------------------------------------------
>
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9012 [EMAIL PROTECTED]
PO Box 969 http://herzberg.ca.sandia.gov
Livermore, CA 94550
---------------------------------------------------------------------
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]
---------------------------------------------------------------------