On Wed, 2011-10-12 at 21:31 +0300, Jussi Lahtinen wrote:
> 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

It doesn't seem to matter to SB.

IMPORT hash.bas

h = hash::New()
hash::SetValue(h,"1234567890A",1)
hash::SetValue(h,"12345678901234567890B",2)
hash::SetValue(h,"123456789012345678901234567890C",3)
hash::Start(h)

FOR x = 1 to 3
  PRINT hash::ThisKey(h), " - "
  PRINT hash::ThisValue(h),"\n"
  hash::Next(h)
NEXT x

hash::Release(h)

jrs@laptop:~/sb/test$ scriba testhash.sb
1234567890A - 1
12345678901234567890B - 2
123456789012345678901234567890C - 3
jrs@laptop:~/sb/test$ 



------------------------------------------------------------------------------
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to