Download MetaTrader 5

modyfing array passed by reference

To add comments, please log in or register
Cristian
20
Cristian  

Hello,

I think I stumbled on a common issue experienced by many: modyfing array passed by reference

Files:
Cristian
20
Cristian  
Can anyone provide so useful sugestion on how in the heck an array can be modified in this manner? What I do not understand is that in other codes seems to work (not this example, though). Thanks!
Keith Watford
Moderator
9641
Keith Watford  

You do not size the arrays so they cannot be given any value.

If you had used property#strict, you would have got an array out of range error. 

Cristian
20
Cristian  
GumRai:

You do not size the arrays so they cannot be given any value.

If you had used property#strict, you would have got an array out of range error. 

Yes, GumRai, you are perfectly right. Your comment is correct and pertinent. Just an ArrayResize is needed, now is working as expected. Thank you very much! Regards!
To add comments, please log in or register