Anonymous user
Loop over multiple arrays simultaneously: Difference between revisions
Loop over multiple arrays simultaneously (view source)
Revision as of 19:24, 6 August 2009
, 14 years ago→{{header|Tcl}}: note about lists of different lengths.
(added haskell) |
m (→{{header|Tcl}}: note about lists of different lengths.) |
||
Line 62:
puts "$i$j$k"
}</lang>
If lists are different lengths, the manual [http://www.tcl.tk/man/tcl8.5/TclCmd/foreach.htm] says:
"The total number of loop iterations is large enough to use up all the values from all the value lists. If a value list does not contain enough elements for each of its loop variables in each iteration, empty values are used for the missing elements."
|