Errors, bugs, questions - page 2538

 
A100:

What does C#, JS and all the rest have to do with it? Read MQL documentation - page 1:

"The syntax of MQL5 is similar to that of C++".

https://www.mql5.com/ru/docs/basis.

A likeness is not a perfect match. However, all this squabbling is off-topic.

 
A100:

.......

"The syntax of MQL5 is similar to that of C++"

............

Similar does not mean similar....

 
A100:

I am communicating with you - in your language - using your vocabulary

That's what I'm sayinghttps://www.mql5.com/ru/forum/1111/page2536#comment_12902751

Okay, your level of demagoguery is clear.

 
Artyom Trishkin:

Similarity is not full compliance. However, this is an offtopic.

I originally pointed out the inconsistency of the MQL documentation, but if the user doesn't understand - then there is an ironclad argument: C++.

 

Why do we need holy wars here ?

As A100 wrote

Незначительная и просто обходится, но все равно ошибка при компиляции:

#define  MACRO()    Print( "OK" ) //Error: ')' - unexpected in macro formal parameter list
void OnStart() { MACRO(); }
I am aware of this difference with C++ (and want to eliminate this difference), but for now there are higher priority tasks.
 
Ilyas:

Express, as a language developer, your attitude towards mentioning and comparing++ with mql.

 
Andrei Trukhanovich:

Express as a language developer your attitude towards mentioning and comparing++ with mql.

Mentioning and comparing is no trouble.

It's the constant er... whining (I can't find another word, sorry) that MQL must completely correspond (be an analogue of) C++. How's that?

 

Error in file <WinAPI\WinUser.mqh>

int                                 GetMenuStringW(HANDLE menu,uint uIDItem,string  str,int max,uint flags);

and should be

int                                 GetMenuStringW(HANDLE menu,uint uIDItem,ushort &str[],int max,uint flags);
 

I also noticed that if I use my"WinUser.mqh" instead of standard<WinAPI\WinUser.mqh>

the resulting .ex5 file is 2 times smaller. From any fundamental differences at the moment I can single out absence of enums (but they are not used actually).

P.S. I added to my"WinUser.mqh" unused structures - the size of .ex5 got closer, but the point is that the added structures are not actually used

 

Igor Makanu:

#define  MACRO(void)    Print( "OK" )

Better #define MACRO( dummy ), plus it is desirable to protect against accidentally passing some argument to the macro. For example:

#define  MACRO(dummy)  Print("OK") dummy
Reason: