??? 11/17/06 05:33 Read: times |
#128147 - One advantage Responding to: ???'s previous message |
Dear Jez,
if you dont put a break statement at the end of each case it just drops through and performs all the coditional statements after the first condition match there is on advantage i can guess. If i want to write a switch statement having same code for some subset of switch values like case 'A','S','D','F' blah blah case <next> i can write switch(ch) { case 'A': case 'S': case 'D': case 'F': blah; blah; break; case <next>: } Abhishek |
Topic | Author | Date |
(SDC)C how to 2 | 01/01/70 00:00 | |
Something like this? | 01/01/70 00:00 | |
maybe this is it... | 01/01/70 00:00 | |
I would use switch | 01/01/70 00:00 | |
One advantage | 01/01/70 00:00 | |
Yeah you are right its not that bizzare![]() | 01/01/70 00:00 |