V Vikjh Member Licensed User May 15, 2024 #1 I'm try this code: B4X: Dim Longkey As Long =10 Dim IntKey As Int =10 Dim m As Map=CreateMap(10:0) If m.ContainsKey(Longkey) Then LogDebug("Longkey") If m.ContainsKey(IntKey) Then LogDebug("IntKey") And result only "IntKey"
I'm try this code: B4X: Dim Longkey As Long =10 Dim IntKey As Int =10 Dim m As Map=CreateMap(10:0) If m.ContainsKey(Longkey) Then LogDebug("Longkey") If m.ContainsKey(IntKey) Then LogDebug("IntKey") And result only "IntKey"
LucaMs Expert Licensed User Longtime User May 15, 2024 #2 Evidently the literal 10 is interpreted as Int. Changing to: B4X: Dim m As Map = CreateMap(Longkey:0) logs: Longkey
Evidently the literal 10 is interpreted as Int. Changing to: B4X: Dim m As Map = CreateMap(Longkey:0) logs: Longkey
Erel B4X founder Staff member Licensed User Longtime User May 15, 2024 #3 Not a bug. For further discussion start a new thread in the questions forum.