Associative array/Iteration: Difference between revisions

Content added Content deleted
No edit summary
Line 2,596: Line 2,596:
When this example was started, the intention was to list the former capitals by key.   Unfortunately, there's a duplicate   (Lancaster).
When this example was started, the intention was to list the former capitals by key.   Unfortunately, there's a duplicate   (Lancaster).
<br><br>
<br><br>

=={{header|Ring}}==
<lang ring>
# Project : Associative array/Iteration
# Date : 2017/10/22
# Author : Gal Zsolt (~ CalmoSoft ~)
# Email : <calmosoft@gmail.com>

lst = [["hello", 13], ["world", 31], ["!", 71]]
for n = 1 to len(lst)
see lst[n][1] + " : " + lst[n][2] + nl
next
</lang>
Output:
<pre>
hello : 13
world : 31
! : 71
</pre>


=={{header|RLaB}}==
=={{header|RLaB}}==