Dim AllCommands() As String = Array As String( _
"", "", _
"UP", "DOWN", "LEFT", "RIGHT", _
"LOOK", "LISTEN", "SPEAK" _
)
Dim CommandValues As Map
CommandValues.Initialize
For I = 0 To AllCommands.Length - 1
If AllCommands(I).Length > 0 Then
CommandValues.Put(AllCommands(I), I)
CommandValues.Put(I, AllCommands(I)) 'translate in other direction too
End If
Next
For Each TestString As String In Array As String("UP", "DOWN", "DO", "NOT", "SPEAK")
Log(TestString & " = " & CommandValues.Get(TestString))
Next
For Each TestNumber As Int In Array As Int(3, 1, 4, 1, 5, 9)
Log(TestNumber & " = " & CommandValues.Get(TestNumber))
Next