RosettaCodeData/Task/Associative-array-Iteration/Lingo/associative-array-iteration.lingo
2023-07-01 13:44:08 -04:00

11 lines
271 B
Text

hash = [#key1:"value1", #key2:"value2", #key3:"value3"]
-- iterate over key-value pairs
repeat with i = 1 to hash.count
put hash.getPropAt(i) & "=" & hash[i]
end repeat
-- iterating over values only can be written shorter
repeat with val in hash
put val
end repeat