Loop over multiple arrays simultaneously: Difference between revisions
Loop over multiple arrays simultaneously (view source)
Revision as of 20:28, 4 August 2023
, 10 months agoFutureBasic 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>
|