source:
CIVL/mods/dev.civl.abc/examples/c/switches.c
| Last change on this file was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 280 bytes | |
| Rev | Line | |
|---|---|---|
| [aad342c] | 1 | int x = 0; |
| 2 | int main() { | |
| 3 | switch(x) { | |
| 4 | case 0: | |
| 5 | x++; | |
| 6 | // fall through | |
| 7 | case 1: x--; | |
| 8 | x = 42; | |
| 9 | break; | |
| 10 | case 3: | |
| 11 | case 5: | |
| 12 | case 7: x = 0; | |
| 13 | break; | |
| 14 | default: x=42; | |
| 15 | } | |
| 16 | ||
| 17 | x = 1; | |
| 18 | ||
| 19 | switch(x+1) {} | |
| 20 | ||
| 21 | x = 2; | |
| 22 | } |
Note:
See TracBrowser
for help on using the repository browser.
