Comma Operation(,)

 

Hello,


I found in mql4 and mql5 documentation both https://docs.mql4.com/basis/operations/other and https://www.mql5.com/en/docs/basis/operations/other, they call it Comma Operation something like this for(i=0,j=99; i<100; i++,j--) Print(array[i][j]);

I tried to add control for j loop like this for(i=0,j=99; i<100, j<5; i++,j--) Print(array[i][j]); but it did not work.

I thought this is a structure that can be used to combined two separate for loop.

Anybody has an experience with this for loop structure and what is the work around?

Thank you for helping out.

Other Operations - Operations and Expressions - Language Basics - MQL4 Reference
Other Operations - Operations and Expressions - Language Basics - MQL4 Reference
  • docs.mql4.com
-1. In particular case, for a one-dimensional array consisting of 50 elements, the reference to the first element will look like array [0], that to the last element will be array [49]. Calling Function with x1, x2 ,..., xn Arguments Each argument can represent a constant, variable, or expression of the corresponding type. The arguments passed...
Files:
Capture.PNG  50 kb