Task

The goal is to create an associative array (also known as a dictionary, map, or hash).



Related tasks:

 Associative arrays/Iteration
 Hash from two arrays


See also

 Array
 Associative array: Creation, Iteration
 Collections
 Compound data type
 Doubly-linked list: Definition, Element definition, Element insertion, List Traversal, Element Removal
 Linked list
 Queue: Definition, Usage
 Set
 Singly-linked list: Element definition, Element insertion, List Traversal, Element Removal
 Stack


needs asarray
 
( create an associative array )
1024 cells is-asarray foo
 
( store 100 as the "first" element in the array )
100 " first" foo asarray.put
 
( store 200 as the "second" element in the array )
200 " second" foo asarray.put
 
( obtain and print the values )
" first" foo asarray.get .
" second" foo asarray.get .