"No longer works" in what way? The code looks fine, should do what you expect if ?y is bound to a number, anyway.

On Mar 21, 2007, at 11:37 PM, Hsin Terry Shen wrote:

Hi everyone,

I have a simple rule that modifies a fact, it works in this scenario:

(defrule get-nonsyn
?syn <- (Synonymity (type ?nspfr&:(regex ?nspfr "nonsynonymous")) (rsnum ?id))
    ?r <- (SNPRank (id ?sid) (rank ?y))
                =>
        (modify ?r (rank ?y) (category "nonsynonymous"))
        )

However, as soon as I try to include an addition function to the "rank" slot of the modify function, it no longer works:

(defrule get-nonsyn
?syn <- (Synonymity (type ?nspfr&:(regex ?nspfr "nonsynonymous")) (rsnum ?id))
    ?r <- (SNPRank (id ?sid) (rank ?y))
                =>
        (modify ?r (rank (+ ?y 0.5)) (category "nonsynonymous"))
        )


---------------------------------------------------------
Ernest Friedman-Hill
Advanced Software Research          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
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