You're actually trying too hard to psych Jess out here. You should
find that
(call ?data replace e o)
will work just fine!
I think Ryan G. Beckes (Home) wrote:
> Hello,
> I am trying to replace some characters in a string using the replace
> method (see below). Using what I have below, Jess says I am overloading
> the replace method, but I can't quite figure out how.
>
> Thanks,
> Ryan
>
>
> (defrule initialize
> =>
> (assert (stuff "mesquite in your cellar"))
> )
>
> (defrule init
> ?stuff <- (stuff ?data)
> =>
> (bind ?r (call ?data replace (new java.lang.Character "e")
> (new java.lang.Character "o")
> )
> )
> (printout t ?data)
> (printout t ?r)
> )
>
>
---------------------------------------------------------
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]
---------------------------------------------------------------------