Re: [Vala] Gee ArrayList item question



On 26 October 2013 10:47, Nor Jaidi Tuah <norjaidi tuah ubd edu bn> wrote:
Concerning L.index_of(x):
    L.index_of(0) => -1  because 0 is not in L.
    L.index_of(1) => -1  because 1 is not in L.

Concerning L.index_of(i):
    L.index_of(10) => 0  because L[0] is 10.
    L.index_of(20) => 1  because L[1] is 20.

Succint! :D

So, the item is the int "10" (e.g.) and the index_of method is
actually searching the entire list for that int. Ok. Gotcha. Thanks.
\d


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]