select case ?????

eben51

Member
Licensed User
Longtime User
There doesn't seem to be a select case, so I'm using and "if" instead, however I can't seem to do "end sub" within the "if" statement....

if blah=1 then
(do code)
end sub
end if

if blah-2 then
(do different code)
end sub
end if
 

klaus

Expert
Licensed User
Longtime User
Select / Case is not yet implemented.

But you can use this:
B4X:
Sub xxx
 If blah=1 Then
 (do code)
 Else If blah-2 Then
 (do different code)
 End If
End Sub

Or:
B4X:
Sub xxx
 If blah=1 Then
 (do code)
 Return
 End If
 
 If blah-2 Then
 (do different code)
 Return
 End If
End Sub
Best regards.
 
Upvote 0
Top