[Gambas-user] Collection key
Benoît Minisini
gambas at ...1...
Wed Oct 12 21:42:23 CEST 2011
>
> Now I'm confused.
> I read this "Collection keys are now hashed with their eight last
> characters." from change log,
"Collection keys are now hashed with their eight last characters." is not the
same sentence as "Collection keys are now limited to eight characters.", is
it?
> and I tested it with following code:
> *
> Dim kol As New Collection(gb.Binary)
>
> kol.Add("a", 12345678)
> kol.Add("b", 123456789)
> kol.Add("c", 1234567890)
> kol.Add("d", 12345678901)
>
> For Each sTmp In kol
> Print sTmp
> Next*
>
> And I did get only "d" printed. Now I re-tested this before sending it to
> you, and I did get:
> a
> b
> c
> d
>
> So there really isn't any limit!? What happened earlier??
Before, collection keys were hashed with their eight first characters. And
before again, they were hashed with all characters.
> Was this "uint hash = 0x9A177BA5 ^ len;" missing earlier?
What are you talking about?
--
Benoît Minisini
More information about the User
mailing list