I have a doubt, is there any way to use ranges instead of specific values in a switch statemnt? i.e. how can i do something like:
I know it is possible in other languages but I have looked into several C books and online articles and haven't found one that talks about this.Code:switch(var){ case 0 to 100: /*Some action*/ break; case 101 to 200: /*Something else*/ break; default: /*Yet something else*/ break; }
Many thanks!