Hi,

This works from Jess:

Jess> (store foo (create$ A B C))
Jess> (fetch foo)
(A B C)

A list (multifield) in Jess is a jess.ValueVector object, so after the
(stroe) above if you called Rete.fetch() in Java code, you'd get a
Value (type RU.LIST) containing a ValueVector.

ValueVector vv = engine.fetch("foo").listValue(engine.getGlobalContext());

This is also the recipe for storing a list from Java which Jess can retrieve:

  ValueVector vv = new ValueVector();
  vv.add(new Value("A", RU.ATOM));
  vv.add(new Value("B", RU.ATOM));
  vv.add(new Value("C", RU.ATOM));
  engine.store("foo", new Value(vv, RU.LIST));

is equivalent to the Jess (store) command above.

See manual section 4.5.

I think Vera =?iso-8859-1?Q?L=FAcia?= da Silva wrote:
> 
> Helo List
> 
> Somebody could supply me an example of as to pass and to receive a
> vector or lists among programs Jess and Java. Is it possible to do this
> with the methods store () and fetch ()? I tried more it was not
> possible.
> 
> Vera


---------------------------------------------------------
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