MitchBu Well-Known Member Licensed User Longtime User Dec 3, 2016 #1 It seems this does not work : B4X: select case kind case "blue" log("blue") case "yellow" log("yellow") end select kind is a string.No error is generated, but the logs never execute. What am I missing ? Is it not possible to use strings in that type of structure ?
It seems this does not work : B4X: select case kind case "blue" log("blue") case "yellow" log("yellow") end select kind is a string.No error is generated, but the logs never execute. What am I missing ? Is it not possible to use strings in that type of structure ?
udg Expert Licensed User Longtime User Dec 3, 2016 #2 B4X: Select kind case "blue" .... End select Sorry for too short answer but I really hate the virtual keyboard on my tablet. udg Upvote 0
B4X: Select kind case "blue" .... End select Sorry for too short answer but I really hate the virtual keyboard on my tablet. udg
Erel B4X founder Staff member Licensed User Longtime User Dec 4, 2016 #4 It should work with both Select and Select Case. The problem is probably somewhere else. Add Log(kind). Maybe the value is not what you are expecting. Upvote 0
It should work with both Select and Select Case. The problem is probably somewhere else. Add Log(kind). Maybe the value is not what you are expecting.
MitchBu Well-Known Member Licensed User Longtime User Dec 4, 2016 #5 I did check that. Value was right, but the selection did not occur. That is when I posted because I did not understand. Upvote 0
I did check that. Value was right, but the selection did not occur. That is when I posted because I did not understand.
Erel B4X founder Staff member Licensed User Longtime User Dec 4, 2016 #6 If you can please create a small project that demonstrates the issue and upload it (File - Export as zip). Upvote 0
If you can please create a small project that demonstrates the issue and upload it (File - Export as zip).
MitchBu Well-Known Member Licensed User Longtime User Dec 4, 2016 #7 Mysteries abound. I just created a small test project, and of course now it works flawlessly. It is not unlike the proverbial TV that works only at the repair shop. At any rate I have modified the code of my current project with no "case", and it works fine. Thank you Upvote 0
Mysteries abound. I just created a small test project, and of course now it works flawlessly. It is not unlike the proverbial TV that works only at the repair shop. At any rate I have modified the code of my current project with no "case", and it works fine. Thank you
LucaMs Expert Licensed User Longtime User Dec 4, 2016 #8 MitchBu said: It is not unlike the proverbial TV that works only at the repair shop. Click to expand... Old TVs worked after a big punch: have you tried (on your Android device)? Upvote 0
MitchBu said: It is not unlike the proverbial TV that works only at the repair shop. Click to expand... Old TVs worked after a big punch: have you tried (on your Android device)?