procmail
[Top] [All Lists]

Re: continue scoring in next recipe (fwd)

2002-01-25 05:38:57
At 16:33 2002-01-18 -0800, Bart Schaefer wrote:
Assuming $myscore has been properly initialized, placing the following
after each "real" recipe that computes a score should do it:

        recipe_score=$=

        :0
        * $ $myscore^0
        * $ $recipe_score^0
        { myscore=$= }

I forgot to mention this in my previous reply, but shouldn't this actually be:

        recipe_score=$=

        :0
        * $ $myscore^0
        * $ $recipe_score^0
        { }

        myscore=$=

The reason being that if (for example) you have a previous score of 150, and the new rule evaluates to -150 (or more), then the additive recipe wouldn't actually execute. The same would hold true if you had a previous balance that was negative and the most recent rule evaluated positive - but not more than the previous negative balance.

Or am I missing something?

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>