Possible error with ArrayResize in current version (Build 600) - page 2

 
angevoyageur:

mql5 produce a warning :

Cannot be used for static allocated array Test.mq5 22 4

Reported to ServiceDesk.

Please don't mix MQL4 and MQL5

There are no static allocated arrays in the MQL4

Exception is array with known size in the structure

 

@stringo I think angevoygeur is verifying the mql5 compiler issues a warning for a condition where the mql4 compiler just fails silently. Thus the mql4 issue is wrong behaviour, and is reported to service desk.

 
ydrol:

@stringo I think angevoygeur is verifying the mql5 compiler issues a warning for a condition where the mql4 compiler just fails silently. Thus the mql4 issue is wrong behaviour, and is reported to service desk.



What is the wrong behavior of mql4 compiler?
 

From MQL4 ArrayResize documentation "The function can be applied only to dynamic arrays. "

If accidentally applied to static arrays then MQL4 compiler does not report an error, and the program behaves oddly. Mql5 compiler does report the error.

PS All info is there in the thread :)

 
exverxes:

Communication with DLL doesn't work as it should. Here are two code samples:

...

Why?

Thank you for your message. Fixed, please wait for updates.
In the current build you should use dynamic arrays in DLL calls.
Reason: