Associative array/Iteration: Difference between revisions
Content added Content deleted
(→{{header|Vlang}}: Rename "Vlang" in "V (Vlang)") |
(FutureBasic solution added) |
||
Line 1,420: | Line 1,420: | ||
1 |
1 |
||
</pre> |
</pre> |
||
=={{header|FutureBasic}}== |
|||
There are many ways to iterate over an associative array (dictionary) in FutureBasic. Below are a few. |
|||
<syntaxhighlight lang="futurebasic"> |
|||
void local fn DoIt |
|||
CFDictionaryRef dict = @{@"A":@"Alpha", @"B":@"Bravo", @"C":@"Charlie", @"D":@"Delta"} |
|||
CFStringRef key |
|||
for key in dict |
|||
print key, dict[key] |
|||
next |
|||
end fn |
|||
fn DoIt |
|||
HandleEvents |
|||
</syntaxhighlight> |
|||
=={{header|Gambas}}== |
=={{header|Gambas}}== |