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

goldbug
Participant
Post count: 52

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 5 years, 5 months ago by  goldbug.