Re: Switch question - yet again!
- Posted by jessedavis Sep 28, 2016
- 11057 views
Spock said...
Try replacing the switch/case block with a normal if block.
If it works perhaps you could do the same replacement _everywhere_ in your code.. and discover, strangely, that your programs all seem to be working better..
Spock
Yes, I can do this. I have done it before and sworn on a stack of Bibles I wouldn't use switch again. I am weak. It was such a simple piece of code. How could I go wrong?
All this aside, switch does have some useful features that makes coding easier and, if implemented suitably, should be more efficient than other methods.
Thanks for your prompt reply.
Regards,
jd