Hi, I'm trying this: if(is_avp_set("$avp(s:avp)") && !isflagset(1) || is_avp_set("$avp(s:avp)") && !isflagset(2)) { ...; }
The first condition before OR operator is never matched. Could you please suggest the correct syntax? Thank you very much. Regards.
I solved in this way: if(is_avp_set("$avp(s:avp)") && !isflagset(1) && !isflagset(2)) { ...; }
Anyway, I'm interested to know, why the syntax in the previous email doesn't work? Thanks. Regards.
Sorry for the question. The problem was in my head. I don't need the OR operator, but an AND operator. So the right expression is that reported in the previous email. Regards,
On 1/11/10 6:27 PM, Antonio Reale wrote:
Sorry for the question. The problem was in my head. I don't need the OR operator, but an AND operator. So the right expression is that reported in the previous email.
ok, anyhow is good to use paranthesis around locgical expression to set priority, especially with || (or), e.g.,
if( ( a || b) && (c || d) )
Cheers, Daniel
2010/1/13 Daniel-Constantin Mierla miconda@gmail.com:
ok, anyhow is good to use paranthesis around locgical expression to set priority, especially with || (or), e.g.,
if( ( a || b) && (c || d) )
Sure. I also tried that, but I missed the correct logic, so the behaviour was not as expected.
Cheers, Daniel
Thanks. Regards.