A truly amazing result!!! - page 9

 
Who's arguing, Galaxy. Point 1 is probably the most convincing.
 
stringo:

I answered this question once before. It goes something like this: "yes, it just so happens that the priority of operations in MQL4 is different from the priority of operations adopted in C. For some historical reasons. It came from MQL II. But since it was not immediately noticed and a lot of programs have already been written, we will not change the priority of operations, because such a change will result in an unexpected change in the operation of a number of programs.

Thanks a lot for the clarification, but 2 hours have already been wasted because it turns out bitwise shift in mql is executed before multiplication. :-/

I should have at least added a warning to the compiler when processing those strings where the behaviour is non-standard.

 

Practitioners have prioritised the difficult ones for convenience. And it's a mess.

"Nerd."

 
WWer:

Why? || has a higher priority than &&


Who told you that? If you teach your child the letter "A" first, then the letter "B", it doesn't mean that "A" has a higher priority. The glitch is clearly in the head of the topicstarter. I wouldn't have thought of using two different logical operations in one expression without brackets. I even bracket multiplication. I just sleep better that way.

 
shredder: I wouldn't have thought of using two different logical operations in one expression without brackets.

The two distributions (one relative to conjunction, the other to disjunction) say that there is no "natural preference" for multiplication over addition in Boolean algebra.

I even bracket multiplication. I just sleep better that way.

Yeah. (chuckles)