procmail
[Top] [All Lists]

Re: what does 1^0 mean ?

2001-12-20 05:46:55
On 20 Dec, parv wrote:
| > On Wed, Dec 19, 2001 at 11:52:51PM -0500, Don Hammond wrote:
| > > That's not correct. Sean already pointed Peter to the procmailsc man
| > > page but, just so there's no confusion, succeeding scored conditions are
| > > all checked until either a) a non-scored condition in the recipe is not
| > > matched or b) a score of 2147483647 or -2147483647 is reached meaning
| > > automatic success/failure.
| ...
| 
| what is not correct?  i seemed to miss a message, if any, which would 
| provide a context.  but i suppose i  can safely assume that don
| h.'s reply was to my suggestion of short-circuit or logic.
| 
| that was a blunder on my part for which i must be flogged.

No flogging necessary. I'm in the mistake hall of fame. The context was
provided with my original message, and the specific statement in
question is (in reference to the 1^0):

| that's the (easy and sane) way to do the shortcut OR logic in 
| procmailrc.  it means if current condition matches, don't run the
| next condition(s), and get on w/ the "action".

It's correct that scoring can be used to OR conditions, but the second
sentence is wrong. If you have a list of x number of scored conditions,
procmail checks all x of them, except under the circumstances described
above. For example,

:0
*  100^2 condition
*  200^1 condition
* -150^2 condition  
* a non scored condition
*  300^2 condition
* -150^3 condition
*  400^1 condition
action here

procmail will check all 6 of the scored conditions unless the cumulative
score reaches 2147483647 or -2147483647 before it gets to the last one,
or if the non-scored condition in the middle does not match.

-- 
Reply to list please, or append "6" to "procmail" in address if you must.
Spammers' unrelenting address harvesting forces me to this...reluctantly.


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