[CLOSED] : Compiler bug with template parameter = void* - page 9

 
A100:

The warning was issued only because the priorities are different in MQL5. Not because ...

So, the Developers have fixed their previous bugs... no more than that

Is there something wrong with the prioritieshere, too?

 
fxsaber:

Is there something wrong with the prioritieshere too?

They are different in MQL5 and old MQL4... I thought you already read that
 
A100:
They are different in MQL5 and old MQL4... I thought you already read that

A list of differences, please.

 
fxsaber:

A list of differences, please.

Can't you make it yourself? Click on the above links?

MQL5 and new MQL4

Operation

Description

Execution order

&&

AND logical operation

From left to right

||

OR logical operation

Left to right


Old MQL4

||

OR logical operation

Left to right

&&

AND logical operation

Left to right

The higher the priority of an operation group, the higher it is placed in the table.

Your example:

bool a = r && g || b;
 
Ilya Malev:
It would be more convenient if the compiler offered to automatically arrange parentheses "correctly", like Excel does when you write an incomplete formula.

In general, there are special programming languages for bracket lovers - LISP. Here's an excerpt from a search engine: "This style is a bit like the LISP language. But in LISP, the large number of parentheses is due to the lack of prioritization of operations."

 
A100:

In general, for fans of brackets there are special programming languages - Simula, LISP. Here is an excerpt from a search engine: "This style is a bit like the LISP language. But in LISP, the large number of parentheses is caused by the lack of priority of operations."

It's good that the compiler warns about something that developers suddenly change in the past logic. If the same warnings were given on function calls like ArrayMaximum after migration of code from mql4, I would have saved a lot of time and nerves in my time (they freely swapped one-type parameters, if you are not aware of it).

 
Ilya Malev:

It's good for the compiler to warn you about something that the developers suddenly change in the past logic.

I don't mind. Just let those warnings stay in the old\new MQL4.

 
As for "normal programmers remember priorities of C++ operations like multiplication table", I personally have more or less remembered it only after I started overloading operators, and before that I've never opened it at all. Not all mql coders are pros, and the developers of the terminal and the language for traders need to take this into account not least.
 
Ilya Malev:

If the same warnings were issued on function calls like ArrayMaximum after transferring code from mql4, I would have saved a lot of time and nerves in my time (they freely swapped the same parameters, if you are not aware)

Well, they are not given out. This is what makes selective coding so bad - it creates an illusion that the compiler will take care of anything (so it's either all or nothing).

 
Ilya Malev:
Not all mql coders are pros, and the developers of the terminal and the language for traders need to take this into account not least.

Exactly! Never a pro, such warnings have helped me 100 times.

Reason: