Simple continue syntax issue

nadia

Trader
Aug 12, 2020
15
0
6
35
MQL4:
      for(int x=0; x<100; x++)
        {
         if(x==1)
            break;
         for(int y=0; y<100; y++)
            if(y>x)
               Print("y ",y);
         break;
        }
How do I use the x from the first for inside the second for loop so that if y is greater to x it lists as correctly? Need it to print from 2 onward, and only once, correctly.

I dont want to just save to a variable and just use in the next for loop when it seems to be a continue thing however its been 4 hours, already checked official docs, didn't solve my issue, I just can't afford more time if its just a 2 second answer

THX
 
Last edited:

nadia

Trader
Aug 12, 2020
15
0
6
35
thanks!! [solved] it!!
Code:
      for(int x=0; x<100; x++)
        {
         if(x==1)
            for(int y=0; y<100; y++)
               if(y>x)
                 {
                  Print("y ",y);
                  break;
                 }
        }