procmail
[Top] [All Lists]

FW: A little cosmetic motion about score

2002-09-28 10:21:38
Dammit, I keep sending to this list from the wrong address.
Sorry if this results in a duplicate.

Philip Guenther wrote:

Since version 3.15, procmail has made sure that the maximum score
is 2^31-1 == 2147483647, period.  It doesn't matter what INT_MAX (or
LONG_MAX) is on your platform, 2147483647 is the maximum score.  So,
unless you're running a version of procmail older than 3.15 
on a platform were long is bigger than 32-bits, you don't have 
anything to worry about.

But if remembering that number is annoying, just use 
something bigger and more memorable, such as 9876543210.  
Indeed, SmartList has used that value in its ORing recipes 
for year and years.  No need to be exact, just big.

On the contrary, I learned recently that it is better to be big
than exact!  (Just ask my gir^H^H^H -- no, never mind.) :)

Take the following:

        SUPREMUM=2147483647
        INFIMUM=-$SUPREMUM

        :0
        *          -1^0
        * $ $SUPREMUM^0
        * $  $INFIMUM^0
        { DID_WE_GET_HERE = yes }

In this case, we never get to the braces!  I found this out
the hard way (actually, a friend who I bounce my procmail ideas
around with pointed it out) about two weeks ago.

On the other hand, in the next example, we DO get to the braces,
instantly, upon reaching $SUPREMUM^0:

        SUPREMUM=9876543210
        INFIMUM=-$SUPREMUM

        :0
        *          -1^0
        * $ $SUPREMUM^0
        * $  $INFIMUM^0
        { DID_WE_GET_HERE = yes }

The latter case is what I would have expected to happen all along.
Now that I've "added inches" to my $SUPREMUM, things work as I wanted.

-- 
Dallman Ross
Voicemail/Fax: +1 (415) 276-2873

"If you find a path with no obstacles, it probably does not lead to
anywhere."
        Thoughts of Rev. Sunnan Kubose, from _Zen in the Markets_ 

_______________________________________________
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>