Re: precedence of if conditions (again)

From: Hank A. Paulson <hap#spamproof.nospammail.net>
Date: Fri, 07 Jan 2011 07:16:29 -0800


On 6/30/10 9:50 PM, Willy Tarreau wrote:
> On Wed, Jun 30, 2010 at 08:53:19PM -0700, Bryan Talbot wrote:
>> See section 7.7: AND is implicit.
>>
>>
>> 7.7. Using ACLs to form conditions
>> ----------------------------------
>>
>> Some actions are only performed upon a valid condition. A condition is a
>> combination of ACLs with operators. 3 operators are supported :
>>
>> - AND (implicit)
>> - OR (explicit with the "or" keyword or the "||" operator)
>> - Negation with the exclamation mark ("!")
>
> I'm realizing that that's not enough to solve Hank's question, because
> the precedence is not explained in the doc (it was so obvious to me that
> it was like in other languages that it's not explained), so :
>
> reqirep blah if a b or c
>
> is evaluated like this :
>
> (a and b) or c
>
> and :
>
> reqirep blah if a b or c d
>
> is evaluated like this :
>
> (a and b) or (c and d)
>
> Regards,
> Willy

I have a more complex grouping and I am still not sure how to create it. I have one required condition A and one of 4 other conditions B1-B4 so I need something like:

if A and (B1 or B2 or B3 or B4)

is there a way to do that? Received on 2011/01/07 16:16

This archive was generated by hypermail 2.2.0 : 2011/01/07 16:30 CET