In X++ Boolean && and || operations have the same priority. That is not the case in other languages where && has higher priority than ||. So adding additional parenthesis to make sure that code works as expected is a good idea.
Example: (true || false && false) will be evaluated to false in X++, but in C# it will be evaluated to true.
Priority of Boolean operations
Views (2560)
This was originally posted here.

Like
Report
*This post is locked for comments