> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of > David Hawley > Sent: Tuesday, January 08, 2002 6:16 AM > To: [EMAIL PROTECTED] > Subject: [REBOL] Re: hash questions
> I come from the perl, tcl world where hashes aremoe like array indicies. Hi, that's what I have in mind too when thinking about hash datastructure. > In rebol, it seems that I can build a hash list, of some arbitray > values, but cannot associate keys with data. Am I missing soemthing? If I understand the hash! in Rebol correct, it's a special datastructure supporting fast searched. Everything you insert can be searched for with find. I assume that find uses the best seach-algorithm depending on the datastructure it searches on (can someone from RT validate this?). So now to use your idea about (key,value). This can be done and it's only a thing you have to change in mind. Just insert your key value pait into the hash. If you now search for the key your value will be the next entry in the hash! ;-)) myhash: hash! [key1 value1 key2 value2] value1 can be found with: next find myhash 'key1 -- Robert M. Munch IT & Management Freelancer Mobile: +49 (0)177 2452 802 Fax : +49 (0)721 8408 9112 Web : http://www.robertmuench.de -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
