Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: hash questions

From: sunandadh:aol at: 8-Jan-2002 10:12

Hi Robert,
> myhash: hash! [key1 value1 key2 value2] > value1 can be found with: next find myhash 'key1
A quick correction, and then a possibly useful tweak. Correction: You need Make Hash! Tweak. Consider using Select. Find positions in the series. Select returns the item itself, not a block position myhash: MAKE hash! [key1 value1 key2 value2] Got-it: next find myhash 'key1 print [type? got-it mold Got-it] Got-it: select myhash 'key1 print [type? got-it mold Got-it] And, as Joel rightly points out, remember the /Skip refinement works on Select too. Sunanda.