I am beginning to have problem checking null condition.
Please consider the sets of codes below.
The log shows the following for both:
something1
nothing2
I appreciate if someone can explain why "(s=Null)" is False.
Please consider the sets of codes below.
The log shows the following for both:
something1
nothing2
I appreciate if someone can explain why "(s=Null)" is False.
B4X:
Sub Activity_Resume
Dim s As String
s = test
If (s=Null) Then
Log("nothing1")
Else
Log("something1")
End If
If (s="null") Then
Log("nothing2")
Else
Log("something2")
End If
End Sub
Sub test As String
Return Null
End Sub
B4X:
Sub Activity_Resume
Dim s As String = Null
If (s=Null) Then
Log("nothing1")
Else
Log("something1")
End If
If (s="null") Then
Log("nothing2")
Else
Log("something2")
End If
End Sub