Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

loop step

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    loop step

    I would like to change the step in a "for" loop...
    when you use "x++", the step is 1. How can I modify it ?

    ex:
    for (i=1;i<10; x goes with a step of 2) ?

    #2
    x=x+2;

    ?

    Mike

    Comment


      #3
      for (i=1;i<20;i=i+2)
      Print("i="+i);

      Comment


        #4
        also,

        i += 2 is equivalent to i = i + 2
        i -= 2
        i *= 2

        etc..

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by MaybellMcKee, Today, 10:18 PM
        0 responses
        3 views
        0 likes
        Last Post MaybellMcKee  
        Started by Lance El Camino, Today, 04:14 PM
        1 response
        12 views
        0 likes
        Last Post s.kinra
        by s.kinra
         
        Started by jtrading82, Today, 04:56 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Started by dmking, Today, 06:00 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_EricB  
        Started by WHICKED, Today, 03:23 PM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X