I wish that this code:
...could be written like this:
...or like this:
https://www.b4x.com/android/forum/threads/is-testing-type-in-select-case-possible.98278/
B4X:
Sub Process_Globals
Type t1(memberX As String)
Type t2(memberY As String)
End Sub
Sub TypeTesting(o As Object)
If o Is t1 Then
Log("t1")
else if o Is t2 Then
Log("t2")
End If
End Sub
...could be written like this:
B4X:
Sub Process_Globals
Type t1(memberX As String)
Type t2(memberY As String)
End Sub
Sub TypeTesting(o As Object)
Select o
case Is t1
Log("t1")
case Is t2
Log("t2")
End Select
End Sub
...or like this:
B4X:
Sub Process_Globals
Type t1(memberX As String)
Type t2(memberY As String)
End Sub
Sub TypeTesting(o As Object)
Select o is
case t1
Log("t1")
case t2
Log("t2")
End Select
End Sub
https://www.b4x.com/android/forum/threads/is-testing-type-in-select-case-possible.98278/