Mill Computing, Inc. Forums The Mill Architecture switches Reply To: switches

goldbug
Participant
Post count: 53

Do you think you could provide an example? How would this code be compiled?


int bar(int x) {
    switch(x) {
       case 0:
         return 1;
       case 2:
       case 3:
         return foo(x);
       case 5:
         return 5;
       case 6:
         return 6;
       case 7:
         return 7;
       case 100:
         break;
       default:
         return 4;
    }
    return 3;
}
  • This reply was modified 7 years, 8 months ago by  goldbug.