Skip to content
trishume edited this page Feb 1, 2012 · 3 revisions

Hashmaps are currently only available as string key, integer value maps through the IntHashMap class.

See the wikipedia article on hash tables: http://en.wikipedia.org/wiki/Hash_table

Code example: https://github.com/Open-Turing-Project/OpenTuring/blob/master/turing/package/Examples/Open%20Turing/Hashmap.t

The interface:

module pervasive IntHashMap
    export all
    
    fcn New () : int
    proc Free (id : int)
    
    proc Put (id : int,key:string,val:int)
    fcn Get (id : int,key:string,var res : int) : int
    proc Remove (id : int,key:string)
end IntHashMap
Clone this wiki locally