

Task

Demonstrate a   for-loop   where the step-value is greater than one.



Related tasks

   Loop over multiple arrays simultaneously
   Loops/Break
   Loops/Continue
   Loops/Do-while
   Loops/Downward for
   Loops/For
   Loops/For with a specified step
   Loops/Foreach
   Loops/Increment loop index within loop body
   Loops/Infinite
   Loops/N plus one half
   Loops/Nested
   Loops/While
   Loops/with multiple ranges
   Loops/Wrong ranges


 
Module LoopFor {
      Locale 1036
      Document doc$
      \\ define i as a single
      def single i
      for i=1 to 21 step 5/3
            Print i
            doc$=format$(" {0}", i)
      next i
      doc$={
      }
      \\ make i as a single
      for i=21 to 1 step 5/3
            Print i
            doc$=format$(" {0}", i)
      next i
      clipboard doc$
      report doc$
}
LoopFor
 