10 lines
383 B
Text
10 lines
383 B
Text
# create map
|
|
map := StringHash->New();
|
|
# insert
|
|
map->Insert("two", IntHolder->New(2)->As(Base));
|
|
map->Insert("thirteen", IntHolder->New(13)->As(Base));
|
|
map->Insert("five", IntHolder->New(5)->As(Base));
|
|
map->Insert("seven", IntHolder->New(7)->As(Base));
|
|
# find
|
|
map->Find("thirteen")->As(IntHolder)->GetValue()->PrintLine();
|
|
map->Find("seven")->As(IntHolder)->GetValue()->PrintLine();
|