Re: [Gambas-user] Array example

2014-07-09 Thread Fabien Bodard
Garrrgh Dim Mycol as new collection Mycol=[2:12,4:13,5:11,8:18] Print mycol[4] Le 9 juil. 2014 12:47, "wig" a écrit : > > Make one array arrNumbers with > > 2 > 4 > 5 > 8 > > > Make another array arrData with > > 12 > 13 > 11 > 18 > > > Then look up the value in the first array (seems to be so

Re: [Gambas-user] Array example

2014-07-09 Thread wig
Make one array arrNumbers with 2 4 5 8 Make another array arrData with 12 13 11 18 Then look up the value in the first array (seems to be sorted) array count start at 0, so this is element number 1 i = arrNumbers.Find(4) ' find value 4 print i 1 and use the found index to take the e

Re: [Gambas-user] Array example

2014-07-09 Thread Fabien Bodard
Well ... Use a collection for that Le 9 juil. 2014 10:50, "abbat81" a écrit : > Hi > > help me with an array, please > > I heve a 2 column of data > > 2 - 12 > 4 - 13 > 5 - 11 > 8 - 18 > > How to use array. > > I need use For each in array to use: > > IF i = array[x, ?] THEN Print array[?, x] '

[Gambas-user] Array example

2014-07-09 Thread abbat81
Hi help me with an array, please I heve a 2 column of data 2 - 12 4 - 13 5 - 11 8 - 18 How to use array. I need use For each in array to use: IF i = array[x, ?] THEN Print array[?, x] ' If I get 4 then print 13, if I get 2 - print 12 . Thanks in advance... -- View this message in co