I have some rules that use math operators and functions (>, <, abs, etc)
but where the values being compared can sometimes be missing (nil).  To
handle this, I'm using the "advice" feature to check for nil and avoid
throwing an error.  This works in some cases but when I have nested
functions, only the advice on the outer is checked.
 
E.g.
(defadvice before > (foreach ?arg $?argv (if (eq ?arg nil) then (return
FALSE))))

defadvice before abs (foreach ?arg $?argv (if (eq ?arg nil) then (return
nil))))

 

If I have a rule which sets a variable ?foo to a value which can
sometimes be nil.  It's not practical in my system to change the pattern
to check for null values at that point.  

If my test is (test (> ?foo  42)) then everything is fine.  But if I use
(test (> (abs ?foo) 42)), then I get an error.  Is there a way to get
the advice on the nested functions run ?  Thanks.

-Russ

Reply via email to