select case syntax

tremara1

Active Member
Licensed User
Longtime User
I would like to use a select case to to find a value in several ranges ie
from 0 to 5 from 6 to 12 and so on. I have tried many combinations but I am not sure of the syntax I need in each case. I know this is going to be simple but I am really stumped...Thanks:sign0161:
 

klaus

Expert
Licensed User
Longtime User
From what I know, the only way is this one:
B4X:
Select var
Case 0,1,2,3,4,5
Case 6,7,8,9,10
End Select

In Visual Basic it is possible with
B4X:
Select Case var
Case 0 To 5
Case 6 To 10
End Select

Erel, couldn't this be an intersting feature ?

Best regards.
 

tremara1

Active Member
Licensed User
Longtime User
thanks

Thanks for your help its great to be part of a team that helps each other...
 

moster67

Expert
Licensed User
Longtime User
I also would like to see this implemented.

Rgds,
moster67

In Visual Basic it is possible with
B4X:
Select Case var
Case 0 To 5
Case 6 To 10
End Select

Erel, couldn't this be an intersting feature ?
 
Top