I am writing an app where I need to search through groups of integers and I believe I found a bug. I am using a list rather than an array because I need to sort the numbers prior to doing the search. Below is the simplified code.
B4X:
Dim L As List ' as Object
L.Initialize
L.Add(5)
L.Add(6)
Log(L.Get(1)-1 = L.Get(0)) ' 6-1 = 5 evaluates true
Log(L.Get(0) = L.Get(1)-1) ' 5 = 6-1 evaluates false <<<<<< Bug??
Dim C(2) As Object
C(0)=5
C(1)=6
Log(C(1)-1 = C(0)) ' 6-1 = 5 evaluates true
Log(C(0) = C(1)-1) ' 5 = 6-1 evaluates false <<<<<< Bug??
Dim C1(2) As Int
C1(0)=5
C1(1)=6
Log(C1(1)-1 = C1(0)) ' 6-1 = 5 evaluates true
Log(C1(0) = C1(1)-1) ' 5 = 6-1 evaluates true