Hi,
You'd have to tell us what the error is exactly. For example, the
following code seems analagous to what you've provided, but it works
fine:
c:/users/root> java jess.Main
Jess, the Java Expert System Shell
Copyright (C) 1998 E.J. Friedman Hill and the Sandia Corporation
Jess Version 5.0a5 5/27/99
Jess> (bind ?s (new java.lang.String "ABCDEFGHIJKLMNOPQRSTUVWXYZ"))
<External-Address:java.lang.String>
Jess> (deffunction builds (?n $?rodes)
(foreach ?x $?rodes
(bind ?code (call ?s indexOf ?x))))
TRUE
Jess> (builds 1 A B C)
2
Jess>
(The astute reader will notice that ?s is not a defglobal. In Jess50a5
you can bind ordinary local variables at the global scope. Makes
experimenting at the keyboard much easier!)
I think Ning Zhong wrote:
>
> Dear jess users,
>
> I have written one jess function:
>
> (deffunction builds (?n $?rodes)
>
> (foreach ?x $?rodes
>
> (bind ?code (call ?*model* get_od ?x))
> )
> )
>
> $?rodes is a multifield variable.
> The method get_od take a String object as its argument.
> I got no error when I run this function in Jess5.0a4.
> How if I run it in JESS5.0a5. It produce an error when calling
> the method get_od. The variable ?x is not treated as a string
> in Jess5.0a5, while in Jess5.0a4 it is.
> Is that we can no longer treat an atom as a string?
>
> Thanks in advance,
>
> Ning
>
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list. 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 9214 [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. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------