This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Conditional with AND and OR logic confusion

I'd like to branch to a certain Label if X=32 -- but only if (N=6 and O=6) or if (N=0 and O=0).

How must I construct that conditional?

Len

ps: Are there any limits to this? Actually, (N=6 and O=6) and (N=0 and O=0) are only two of some 173 conditions that I must state.

Parents
  • If using C - just make sure to use the required number of parentheses to inform in which order the subexpressions should be evaluated.

    I think it's worth pointing out that parentheses don't necessarily affect the order of evaluation but do affect precedence. This is usually what is desired, but not always. To guarantee order of evaluation it is necessary to ensure that sequence points appear between expressions.

Reply
  • If using C - just make sure to use the required number of parentheses to inform in which order the subexpressions should be evaluated.

    I think it's worth pointing out that parentheses don't necessarily affect the order of evaluation but do affect precedence. This is usually what is desired, but not always. To guarantee order of evaluation it is necessary to ensure that sequence points appear between expressions.

Children
No data