Restricting the execution of a case block in a switch statement?
Posted on 2001-08-08
The scenario is that there is a while loop which terminates on some condition. There is a switch statement in the loop, which has many case statements. I want that every case block should be executed only once and whenever control comes in the already executed case, it should generate error.
Can somebody please write a best suited implementation strategy for this?