Respond to this messageReturn to Index
Original Message
  • Explanation of STEP
    • RpgFan (Login rpgfan3233)
      Posted Nov 18, 2009 4:04 PM

      FOR i = 1 TO 5 STEP 2
      PRINT "x"
      NEXT

      That does the same as the following code:
      PRINT "x" 'i = 1
      PRINT "x" 'i = 3
      PRINT "x" 'i = 5

      A good way to see it visually:
      FOR i = 1 TO 5 STEP 2
      PRINT i; "x" 'prints i before the "x"
      NEXT

      That should help you.
    Your Name
    Message Title
    Message Text
    Options
          


     Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement