procmail
[Top] [All Lists]

Integers and Reals in scoring

2001-06-07 03:32:02
The last paragraph of the DESCRIPTION section of "man procmailsc"
says:

    A certain condition can contribute to  the  score  if  you
    allocate  it a `weight' (w) and an `exponent' (x).  You do
    this by preceding the condition (on the same line) with:
         w^x
    Whereas  both  w  and   x   are   real   numbers   between
    -2147483647.0 and 2147483647.0.

Is it true that *_real_* numbers are supported, (and not just
integers)?

Yep...procmail uses doubles internally for scoring.

will always have an integer in the X-SCORE: header field, (or does it
truncate it, or round it?)

The real value is converted to a long integer value when setting $=.  So
they get truncated.  However, if the real value is between 0 and 1 then
it is rounded up to 1.

Hope that helps,
Martin
-- 
Martin McCarthy                 /</                  PGP key available
    `Procmail Companion'        \>\  http://www.ancient-scotland.co.uk
     Addison Wesley             /</    http://www.ehabitat.demon.co.uk
_______________________________________________
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>