Jump to content

Array concatenation: Difference between revisions

Add LIL
(Add LIL)
Line 1,924:
print array3(i)
next</lang>
 
=={{header|LIL}}==
LIL uses lists instead of arrays. The builtin '''append''' command could be used as '''append a $b''', but that would add the entire list in variable '''b''' as one item of variable '''a'''. The '''foreach''' flattens the items of b for appended to a. The '''concat'' builtin would end up smushing together the last item of a with the first item of b.
 
<lang tcl>##
Array concatenation in LIL
##
set a [list 1 2 3]
set b [list 4 5 6]
foreach i $b {append a $i}
print $a
print [index $a 3]</lang>
 
=={{header|Limbo}}==
<lang limbo>implement Command;
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.