Download MetaTrader 5

Build 969 - ArraySize returns uint instead of int

To add comments, please log in or register
Do you want to learn MQL5? 300 articles will help you!
Enrico Ballardini
1714
Enrico Ballardini 2014.07.26 13:56 

Hello there,

 since build 969 the ArraySize function returns uint datatype instead of int. Now, the return type itself is ok, it's logically correct and it's safe...

The drawback is I get a lot of warnings during compilation, even in Metaquote's code.

What to do?

  • rewrite EVERY SINGLE FILE to be compliant with the ArraySize function (going insane)
  • do nothing and just stop considering warnings at compile (going unsafe)
  • ask to restore the original ArraySize return type?
Considering the official documentation still says "INT", I hope this is a bug..


Thanks
Enrico Ballardini
1714
Enrico Ballardini 2014.07.26 14:15  

Here is what I did to suppress the warning:

Replaced in files all occurrences of "ArraySize" with "(int)ArraySize".

That's not a clean nor perfect solution, but did the job! 

Pasi Hakamaki
4723
Pasi Hakamaki 2014.07.26 14:41  
lamemind:

Here is what I did to suppress the warning:

Replaced in files all occurrences of "ArraySize" with "(int)ArraySize".

That's not a clean nor perfect solution, but did the job! 

I noticed this too. I think it is not a bug though, it makes more sense to use uint instead of int here.
Alain Verleyen
Moderator
30744
Alain Verleyen 2014.07.28 15:45  

Forum on trading, automated trading systems and testing trading strategies

many warnings "possible loss of data due to type conversion" at MT5 terminal bulild 969

angevoyageur, 2014.07.28 12:59

It seems ArraySize has been modified to return an 'uint' instead of an 'int'. You can ignore these warnings.

However you can write to ServiceDesk about this issue.


To add comments, please log in or register