E eben51 Member Licensed User Longtime User Dec 21, 2010 #1 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
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 Dec 21, 2010 #2 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
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.
E eben51 Member Licensed User Longtime User Dec 21, 2010 #3 the "Return" is that the same as "exit sub", or "end sub" ??? Upvote 0
klaus Expert Licensed User Longtime User Dec 21, 2010 #4 Return is equivalent to Exit Sub. You can also return a variable with return. Basic4android - Core Best regards. Upvote 0
Return is equivalent to Exit Sub. You can also return a variable with return. Basic4android - Core Best regards.