[Gambas-user] Collection key

Jussi Lahtinen jussi.lahtinen at ...626...
Wed Oct 12 20:31:55 CEST 2011


You did it wrong.
Gambas would interpret your keys this way:
"A1234567"
"B1234567"
"C1234567"

Use reversed order, that way following keys are all same:
"12345678A"
"12345678B"
"12345678C"

---> "12345678"

Jussi





On Wed, Oct 12, 2011 at 20:16, tobias <tobiasboe1 at ...20...> wrote:

> On 12.10.2011 19:05, John Spikowski wrote:
> > On Wed, 2011-10-12 at 19:43 +0300, Jussi Lahtinen wrote:
> >> My first thought too... and I wonder why there is limit anyway..?
> >> I have understand that collection works with hash values, and at least
> there
> >> are no practical limitations with MD5 hash function.
> >>
> >> Jussi
> > For grins, I thought I would test the hash key length in ScriptBasic to
> > see if this was a common problem. I don't think there is a practical
> > limit to the key size in ScriptBasic.
> >
> > IMPORT hash.bas
> >
> > h = hash::New()
> > hash::SetValue(h,"A1234567890",1)
> > hash::SetValue(h,"B12345678901234567890",2)
> > hash::SetValue(h,"C123456789012345678901234567890",3)
> > hash::Start(h)
> >
> > FOR x = 1 to 3
> >    PRINT hash::ThisKey(h), " - "
> >    PRINT hash::ThisValue(h),"\n"
> >    hash::Next(h)
> > NEXT
> >
> > jrs at ...1833...:~/sb/test$ scriba testhash.sb
> > A1234567890 - 1
> > B12345678901234567890 - 2
> > C123456789012345678901234567890 - 3
> > jrs at ...1833...:~/sb/test$
>
> i tested the limitation, too, in gb3 but it ran o.k.
> how may the exceeding of the key length influence the program integrity?
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list