Hello,
 
I use the function mod, and it doesn't work with a long type. I read in documentation the function work with Integer. The problem is that Jess doesn't throws an error when we use mod with a long type and send a wrong answer !!!
 
For exemple, I try this script :
 
    (defrule calculMod
        (aLong ?long)
    =>
        (bind ?result (mod ?long 97))
        (assert (modResult ?result))
    )
 
    (reset)
    (bind ?obj (new Long "1111111111111"))
    (assert (aLong (call ?obj longValue)))
    (run)
    (facts)
 
I notice that mod with a long type, return always 65.
 
Somemone could answer me about that ?
 
Thanks
 
Franck
 

Reply via email to