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 memonolog, Today, 03:30 AM
        0 responses
        1 view
        0 likes
        Last Post memonolog  
        Started by toughiee, Today, 12:04 AM
        0 responses
        3 views
        0 likes
        Last Post toughiee  
        Started by vdoan20, Yesterday, 08:30 PM
        0 responses
        8 views
        0 likes
        Last Post vdoan20
        by vdoan20
         
        Started by gupagoer, Yesterday, 07:42 PM
        0 responses
        9 views
        0 likes
        Last Post gupagoer  
        Started by Holligoly, Yesterday, 05:13 PM
        2 responses
        11 views
        0 likes
        Last Post Holligoly  
        Working...
        X