Thanks for your reply.

All is now ok :)

Alan.

Ernest Friedman-Hill wrote:

> I think Alan Barton wrote:
> >
> >
> > 1) If I create a new string that only contains numbers and assert
> >     that fact, JESS automatically tries to convert it to a number. But
> >     since it is a "very" large number the value inside JESS becomes
> >     infinity. Would it be better to keep it as a string if the conversion failed??
> >     This is probably a non interesting question...
> >     Ex.
> >         String largeNumberString = new String("123456789...allNumsInHere...90");
> >         jessEngine.executeCommand("(assert (foo " + largeNumberString + ") )");
>
> Well, if you want strings, you can force these to be parsed a Strings
> just by sticking quotes around them:
>
>         executeCommand("(assert (foo \"12345\"))");
>
> will interpret the slot as a string, not as an int. This kind of
> limitation is not different from any other programming language, where
> overly-large literals are generally a compile-time error.
>
> >
> > 2) How can I retract a fact that contains a multivariable?
> >     The commented code to retract the fact does not work,
> >     but I can print the values.
>
> Works for me... if you run the following program, you'll see all three
> facts get retracted in turn.
>
> (watch all)
> (defrule TEST01
>         ?factID <- (foo $?values)
>         =>
>         (printout t $?values crlf)
>         (retract ?factID))
>
> (assert (foo) (foo bar) (foo bar bar))
> (run)
>
> ---------------------------------------------------------
> 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]
---------------------------------------------------------------------

Reply via email to