Looking back in the thread, here's that do-extract deffunction:

statement = "(deffunction do-extract (? rand) "+
                                        "(?rand extractRoots))";

and back to your original message, here's the declaration of extractRoots:

      public void extractRoots(Integer primeRoot)

So the error is because your do-extract deffunction wasn't passing any argument when it called extractRoots, but that method requires one.



On Feb 19, 2009, at 10:42 AM, David Ray wrote:

Hi Ernest,
 Wow an email from the man himself! :)  Thanks for responding! I had
to change your version on the last line to this:

statement = "(defrule modulus"+divisor+
            " (RandomNumber (value ?x) (OBJECT ?a))" +
            " (test (eq 0 (mod ?x "+divisor+")))"+
            "=>"+
            "(call ?a extractRoots "+divisor+"))";   <---- HERE

Just to let you know... Your version:

=======
statement = "(defrule modulus"+divisor+
            " (RandomNumber (value ?x) (OBJECT ?a))" +
            " (test (eq 0 (mod ?x "+divisor+")))"+
            "=>"+
            "(do-extract ?a))";
=======

gave me the following message:

Jess reported an error in routine call
        while executing (call ?rand extractRoots)
        while executing deffunction do-extract
        while executing (do-extract ?a)
        while executing defrule MAIN::modulus223.
 Message: No overloading of method 'extractRoots' in class
RandomNumber I can call with these arguments: (call ?rand
extractRoots).
        
Not sure why?

Thanks,
David


--------------------------------------------------------------------
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
Informatics & Decision Sciences          Phone: (925) 294-2154
Sandia National Labs
PO Box 969, MS 9012                            [email protected]
Livermore, CA 94550                             http://www.jessrules.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].
--------------------------------------------------------------------

Reply via email to