RosettaCodeData/Task/Loop-over-multiple-arrays-simultaneously/REXX/loop-over-multiple-arrays-simultaneously-3.rexx

9 lines
315 B
Rexx
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
/*REXX program shows how to simultaneously loop over multiple lists.*/
2015-02-20 00:35:01 -05:00
x = 'a b c d'
y = 'A B C'
z = 1 2 3 4
do j=1 until output=''
output = word(x,j) || word(y,j) || word(z,j)
say output
2016-12-05 22:15:40 +01:00
end /*j*/ /*stick a fork in it, we're done.*/