Associative array/Iteration: Difference between revisions
Content added Content deleted
(Added Elixir) |
|||
Line 489: | Line 489: | ||
<lang elena>#define system. |
<lang elena>#define system. |
||
#define system'collections. |
#define system'collections. |
||
#define system'routines. |
|||
#define extensions. |
|||
// --- Program --- |
// --- Program --- |
||
Line 496: | Line 498: | ||
// 1. Create |
// 1. Create |
||
#var aMap := Dictionary new. |
#var aMap := Dictionary new. |
||
aMap |
aMap@"key" := "foox". |
||
aMap |
aMap@"key2":= "foo2". |
||
aMap |
aMap@"key3":= "foo3". |
||
aMap |
aMap@"key4":= "foo4". |
||
aMap set &key:"key4" &object:"foo4". |
|||
// Enumerate |
// Enumerate |
||
aMap run &each: aKeyValue |
|||
[ console |
[ console writeLine:(aKeyValue key):" : ":aKeyValue ]. |
||
].</lang> |
].</lang> |
||