Loops/For with a specified step: Difference between revisions

add RPL
(Added Chipmunk Basic, GW-BASIC, Minimal BASIC, MSX Basic QBasic, Quite BASIC and Tiny BASIC)
(add RPL)
Line 2,408:
</pre>
 
=={{header|RPL}}==
Specific increment is given as an argument to the <code>STEP</code> instruction at the end of each loop. Usually, it is a constant value, but it could be a variable if it makes sense.
≪ 1 10 '''FOR''' j
j
2 '''STEP'''
=={{header|Ruby}}==
<syntaxhighlight lang="ruby">2.step(8,2) {|n| print "#{n}, "}
1,150

edits