pls look at the following code
run the program, the log shows"
s is not null
o is null
so why first if s<> Null then... prgram judge (s<> Null) = True
and the second if o<> Null Then... prgram judge (o<> Null) = False ?
What leads to such result?
Thanks
B4X:
dim map1 as map
dim s as string
dim o as object
map1.Initialize
map1.Put("4","d")
map1.Put("1","a")
map1.Put("101","a")
s = map1.get(1) ' s = null
o = map1.Get(1) 'o = null
If s<> Null Then
Log("s is not null")
Else
Log("s is null")
End If
If o<> Null Then
Log("o is not null")
Else
Log("o is null")
End If
run the program, the log shows"
s is not null
o is null
so why first if s<> Null then... prgram judge (s<> Null) = True
and the second if o<> Null Then... prgram judge (o<> Null) = False ?
What leads to such result?
Thanks
Last edited: