; docformat = 'rst' ;+ ; Wrapper to create an MGcoHashTable. ; ; :Returns: ; MGcoHashTable object ; ; :Keywords: ; _extra : in, optional, type=keywords ; keywords to MGcoHashTable::init ;- function mg_hash, _extra=e compile_opt strictarr hashtable = obj_new('MGcoHashTable', _extra=e) return, hashtable end ; main-level example program h1 = mg_hash(key_type=7, value_type=7) h1->put, 'Tech-X', 'Boulder, CO' ; h1['Tech-X'] = 'Boulder, CO' h1->put, 'ITT VIS', 'Boulder, CO' ; h1['ITT VIS'] = 'Boulder, CO' h2 = mg_hash(key_type=7, value_type=7) h2->put, 'Google', 'Mountain View, CA' ; h2['Google'] = 'Mountain View, CA' h2->put, 'Microsoft', 'Redmond, WA' ; h2['Microsoft'] = 'Redmond, WA' h2->put, 'Apple', 'Cupertino, CA' ; h2['Apple'] = 'Cupertino, CA' h3 = h1->_overloadPlus(h1, h2) ; h3 = h1 + h2 print, h3->_overloadPrint() ; print, h3 end