Bob,

In CLIPS you could use the 'progn' construct to wrap several
expressions:

(progn
    (assert (one 1)) (assert (two 2))
)

In Jess perhaps the simplest thing to do
is define a function (with no args perhaps) and execute it.

(deffunction x ()
    (assert (one 1)) (assert (two 2))
)

(x)

but of course this still requires 2 expressions.

Bob.

> Ernest,
>
>     I see. Can you give me a hint as to how I might modify Jesp so that
> it will consume multiple s-expressions? Unfortunately, I am already tracking
> a couple of minor modifications to the release.
>
>     Thanks again.
>
>     Bob
>
> Ernest Friedman-Hill wrote:
>
> > Hi Bob,
> >
> > It works this way just because that's how the CLIPS command-line
> > interface works, and CLIPS compatibility used to be a big driver for
> > Jess.
> >
> > I think Bob Johnson wrote:
> > >
> > >
> > >     I am wondering why Console.class only evaluates one s-expression per
> > >
> > > invocation. More precisely, why does Jesp.parse() seem to only process
> > > one
> > > s expression given the "while (!val.equals(Funcall.EOF))" control
> > > structure?
> > >
> > > Example:
> > > ---------------------------------------------------------------------------------
> > >
> > > Jess, the Java Expert System Shell
> > > Copyright (C) 1998 E.J. Friedman Hill and the Sandia Corporation
> > > Jess Version 5.0b2 11/8/99
> > >
> > > Jess> (assert (one 1)) (assert (two 2))
> > > <Fact-0>
> > > Jess> (facts)
> > > f-0   (one 1)
> > > For a total of 1 facts.
> > > Jess>
> > > ---------------------------------------------------------------------------------
> > >
> > > Regards,
> > >
> > > Bob
> > >
> >
> > ---------------------------------------------------------
> > 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]
---------------------------------------------------------------------

Reply via email to