RosettaCodeData/Task/Associative-array-Iteration/Harbour/associative-array-iteration.harbour

12 lines
190 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
LOCAL arr := { 6 => 16, "eight" => 8, "eleven" => 11 }
LOCAL x
FOR EACH x IN arr
// key, value
? x:__enumKey(), x
// or key only
? x:__enumKey()
// or value only
? x
NEXT