[REBOL] Re: Hashes in Rebol
From: the:optimizer:tiscali:it at: 9-Dec-2003 21:16
On Tue, 9 Dec 2003 22:03:52 +0300, Konstantin Knizhnik <[knizhnik--garret--ru]>
wrote:
> 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?
>
Not a big expert but you MAY TRY:
>> h: make hash! [1 "one" 2 "two"]
== make hash! [1 "one" 2 "two"]
select h 1
== "one"
>> select h 2
== "two"
Is this what you wanted?
M&F