Re: Switch question - yet again!

new topic     » goto parent     » topic index » view thread      » older message » newer message
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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu