How to sort the code blocks associated with each case (as part of a large case switch construct) based on the case label?
I want to convert -
switch(val)
{
case C_LABEL:
break;
case A_LABEL:
break;
case B_LABEL:
break;
default:
printf("'val' not recognized");
}
at -
switch(val)
{
case A_LABEL:
break;
case B_LABEL:
break;
case C_LABEL:
break;
default:
printf("'val' not recognized");
}
source
share