modyfing array passed by reference

Back to topics list To post a new topic, please log in or register
avatar
7
Christian07 2015.04.24 08:57
 

Hello,

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

Attached files:
  arraybyreference.mq4  (2.15 KB)
avatar
7
Christian07 2015.04.24 09:00 #
 
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!
avatar
Moderator
3406
GumRai 2015.04.24 10:54 #
 

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. 

avatar
7
Christian07 2015.04.24 21:21 #
 
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!
Back to topics list  

To add comments, please log in or register