Associative array/Iteration: Difference between revisions

Content added Content deleted
No edit summary
Line 1,093: Line 1,093:
Dim cList As Collection = ["2": "quick", "4": "fox", "1": "The", "9": "dog", "7": "the", "5": "jumped", "3": "brown", "6": "over", "8": "lazy"]
Dim cList As Collection = ["2": "quick", "4": "fox", "1": "The", "9": "dog", "7": "the", "5": "jumped", "3": "brown", "6": "over", "8": "lazy"]
Dim siCount As Short
Dim siCount As Short
Dim sTemp As String

For Each sTemp In cList
Print cList.key & "=" & sTemp;;
Next

Print


For siCount = 1 To cList.Count
For siCount = 1 To cList.Count
Line 1,101: Line 1,108:
Output:
Output:
<pre>
<pre>
2=quick 4=fox 1=The 9=dog 7=the 5=jumped 3=brown 6=over 8=lazy
The quick brown fox jumped over the lazy dog
The quick brown fox jumped over the lazy dog
</pre>
</pre>