Associative array/Creation: Difference between revisions

Content deleted Content added
Added Toka
Line 455:
puts $hash($key)
}
 
==[[Toka]]==
[[Category:Toka]]
 
Toka provides associative arrays via a library.
 
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 .