You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.
In MQL5 the priorities of operations correspond exactly to the priorities adopted in C++
In MQL5 the priorities of operations correspond exactly to the priorities adopted in C++
Thank you. I think we're done here. We're waiting for five.
From the symmetry of operations. And the symmetry of operations follows directly from the allocated formulas.
One of symmetric operations cannot have priority over the other.
Andrew, I do not dispute that operations are symmetric. But how does equality of priorities follow from their symmetry? I've already given you an expression the result of which is undefined. It changes depending on how we open the brackets.
What is priority? It's a way of interpreting an undefined expression a or b and c, i.e. an instruction about which part of it should be evaluated first. This way actually sets the relative priority of conjunction and disjunction operations. In C, if there is no additional information, implicit parentheses that determine the order of calculations should be put like this: a or (b and c), and in MQL4 - (a or b) and c. The results will be different.
I suspect that, unlike arithmetic with usual addition and multiplication operations, in pure Boolean algebra there is simply no unambiguous interpretation of the above expression - and hence no priority of operations by default. Priority only appears in programming languages. But I could be wrong.
P.S. There, you've already answered yourself.
I suspect that, unlike arithmetic with the usual addition and multiplication operations, in pure Boolean algebra there is simply no unambiguous interpretation of the above expression - and thus no priority of operations by default. Priority only appears in programming languages. But I could be wrong.
That's what I meant to say. So, imho, you can specify any order in the language, and it is by no means a mistake. The only problem is the commonness of the solution.
....
Priority only appears in programming languages. But I could be wrong.
Not only, in most textbooks on algebra of logic the priority is defined too, i.e. logical multiplication has a higher priority than logical addition, this was definitely taught myself, it is intensively exploited when deriving the FFT (DNF) without truth table, analytically
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.
In MQL5 the priorities of operations correspond exactly to the priorities adopted in C++.
That's cool. How is support for other languages available in 5? Fully supported, not through DLL.
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.
In MQL5 the priorities of operations correspond exactly to the priorities adopted in C++
Good answer. I completely agree with this question. This is a responsible decision.
Not only, in most textbooks on algebra of logic the priority is also defined, i.e. logical multiplication has a higher priority than logical addition, this is exactly what I taught myself, it is exploited intensively when deriving DNF (DNF) without a truth table, analytically
Yes, indeed. My apologies. But it's not right.
Я готов согласиться, Galaxy, что умножение в учебниках неявно (по умолчанию) имеет высший приоритет по отношению к сложению. Но никакого отражения в синтаксисе для такого факта нет. Это просто соглашение, принятое для интерпретации сокращенных выражений, в которых нет скобок.
Boolean lattices, filters, ideals, rings... However, the name conjunction is not called logical multiplication from the light of day: there are several direct interpretations
1. If we take a ring of deductions modulo two i.e. (0,1 +,*), then the table of multiplication exactly corresponds to the truth table for conjunction and accordingly, the table of addition of this ring - to the table of Boolean symmetric difference or excluding "or " (I got it wrong and corrected).i.e. we have binary arithmetic, a special case of usual arithmetic, where multiplication is superior to addition, i.e. conjunction is superior to symmetric difference and hence, obviously, to disjunction.
2. In Boolean algebra 1 is a neutral element for conjunction, a 0 for disjunction : 1 && a = a, 0 && a = 0; 1 || a = 1, 0 || a = a ;
3. Filters (constructed by intersection) always contain 1, ideals (constructed by union) contain 0, though filter and ideal are dual.