Loop over multiple arrays simultaneously: Difference between revisions

FutureBasic solution added
(added Applesoft BASIC, and fixed duplicate line 150 in ZX Spectrum Basic)
(FutureBasic solution added)
Line 1,983:
bB2
cC3
</pre>
 
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
void local fn DoIt
CFArrayRef a1 = @[@"a",@"b",@"c"]
CFArrayRef a2 = @[@"A",@"B",@"C"]
CFArrayRef a3 = @[@"1",@"2",@"3"]
long i, count = len(a1)
for i = 0 to count - 1
print a1[i]a2[i]a3[i]
next
end fn
 
fn DoIt
 
HandleEvents
</syntaxhighlight>
{{output}}
<pre>
aA1
bB2
Cc3
</pre>
 
416

edits