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

[REBOL] Re: Hashes in Rebol

From: nitsch-lists::netcologne::de at: 9-Dec-2003 20:56

Am Dienstag 09 Dezember 2003 20:03 schrieb Konstantin Knizhnik:
> Hello Gregg, > > Thank you very much for explanation. > Certainly it is very universal approach to treat everything as > series. But as all universal solutions is is not always convenient to > use:). If I remove exactly one element from the hash - what will be > result of such operation... > > But actually I need hash table with integer key (object OID). > And here once again Rebol rules are not compatible with my > expectations: > > == make hash! [1 "one" 2 "two"] > > >> h select 1 > > ** Script Error: select expected series argument of type: series port > > Is it possible to have hash table with integer key? > Or I should first convert it to string?
Better convert it to this syntax:
>> h: make hash! [1 "one" 2 "two"]
== make hash! [1 "one" 2 "two"]
>> select h 1
== "one" ;) method object in rebol for inbuilds. -Volker