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].
--------------------------------------------------------------------

Reply via email to