Associative array/Iteration: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: aligned to capitols (in the output) for easier reading.) |
Walterpachl (talk | contribs) m (→{{header|ooRexx}}: add output) |
||
Line 1,888: | Line 1,888: | ||
=={{header|ooRexx}}== |
=={{header|ooRexx}}== |
||
<lang oorexx> |
<lang oorexx>d = .directory~new |
||
d = .directory~new |
|||
d["hello"] = 1 |
d["hello"] = 1 |
||
d["world"] = 2 |
d["world"] = 2 |
||
Line 1,909: | Line 1,908: | ||
say "key =" s~index", value =" s~item |
say "key =" s~index", value =" s~item |
||
s~next |
s~next |
||
end |
end</lang> |
||
{{out}} |
|||
</lang> |
|||
<pre>key = ! |
|||
key = world |
|||
key = hello |
|||
value = 3 |
|||
value = 2 |
|||
value = 1 |
|||
key = !, value = 3 |
|||
key = world, value = 2 |
|||
key = hello, value = 1</pre> |
|||
=={{header|Oz}}== |
=={{header|Oz}}== |