[Gambas-user] Collection key

Caveat Gambas at ...1950...
Wed Oct 12 21:37:12 CEST 2011


  DIM coll AS NEW Collection
  DIM value AS String
  coll.Add("A", "12345678A")
  coll.Add("B", "12345678B")
  coll.Add("C", "12345678C")
  coll.Add("D", "12345678")
  FOR EACH value IN coll
    PRINT "Value: " & value & "   Key: " & coll.key & "   Value of
coll[" & coll.key & "] : " & coll[coll.key] 
  NEXT

I don't get what the problem is.  In both Gambas2 and Gambas3 I get the
expected result: 

Value: A   Key: 12345678A   Value of coll[12345678A] : A
Value: B   Key: 12345678B   Value of coll[12345678B] : B
Value: C   Key: 12345678C   Value of coll[12345678C] : C
Value: D   Key: 12345678   Value of coll[12345678] : D

Am I missing the obvious here, or is this affecting only a certain
version of Gambas or a specific platform?

Kind regards,
Caveat





More information about the User mailing list