You need to explicitly create the list in Jess; the function typically
called "list" in many LISPs is called "create$" in Jess.
(bind ?x hi)
(load-function DoCollect)
(do-collect (create$ ?x there))
Should do approximately what you want.
I think Thomas Tarbet wrote:
> Hi,
>
> I'm trying to pass a list from jess to a user defined
> java function. But the list is evaluated before being
> sent. I don't want to evaluate it. In lisp I would
> quote the list. Is there a way to to this in jess?
>
> I think I need to use ValueVector.listValue but
> pounding my head isn't working.
>
> java:
> public class DoCollect implements Userfunction
> {
> public String getName() { return "do-collect"; }
>
> public Value call(ValueVector vv, Context context)
> throws JessException
> {
> ValueVector what =
> vv.get(1).listValue(context);
> System.out.println(what);
> return new Value("do-collected done.",
> RU.STRING);
> }
> }
>
> jess:
> (bind ?x hi)
> (load-function DoCollect)
> (do-collect (?x there)
>
> but this fails.
> I would like something in java that looks like (hi
> there).
>
>
> thanks
>
> tom
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.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]
> ---------------------------------------------------------------------
>
---------------------------------------------------------
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]
---------------------------------------------------------------------