RosettaCodeData/Task/Associative-array-Iteration/Gambas/associative-array-iteration...

17 lines
346 B
Plaintext

Public Sub Main()
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 sTemp As String
For Each sTemp In cList
Print cList.key & "=" & sTemp;;
Next
Print
For siCount = 1 To cList.Count
Print cList[Str(siCount)];;
Next
End