Re: Speeding up 'dictionary' search

new topic     » goto parent     » topic index » view thread      » older message » newer message

This is exactly what a map is for.

include std/map.e 
 
map my_dict = map:new() 
 
-- store some data 
map:put( my_dict, "key", "value" ) 
 
if map:has( my_dict, "key" ) then 
    -- the key exists 
 
    -- get some data 
    object value = map:get( my_dict, "key" ) 
 
end if 

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu