RosettaCodeData/Task/Loop-over-multiple-arrays-simultaneously/LiveCode/loop-over-multiple-arrays-simultaneously-1.livecode

17 lines
355 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
command loopArrays
local lowA, uppA, nums, z
put "a,b,c" into lowA
put "A,B,C" into uppA
put "1,2,3" into nums
split lowA by comma
split uppA by comma
split nums by comma
repeat with n = 1 to the number of elements of lowA
put lowA[n] & uppA[n] & nums[n] & return after z
end repeat
put z
end loopArrays