source:
src/Clight/test/switcher.c
@
1224
Last change on this file since 1224 was 770, checked in by , 10 years ago | |
---|---|
File size: 238 bytes |
Line | |
---|---|
1 | extern int get(void); |
2 | |
3 | int main(void) { |
4 | char i = 0; |
5 | |
6 | switch(get()) { |
7 | case 1: |
8 | break; |
9 | case 3: |
10 | i++; |
11 | break; |
12 | case 5: |
13 | i+=2; |
14 | /* fall through */ |
15 | case 7: |
16 | i+=3; |
17 | break; |
18 | default: |
19 | i+=16; |
20 | } |
21 | return i; |
22 | } |
Note: See TracBrowser
for help on using the repository browser.