Mercurial > projects > dstress
comparison run/switch_04.d @ 0:3269e4627918
init dstress
author | svnowner |
---|---|
date | Sat, 25 Sep 2004 22:33:30 +0000 |
parents | |
children | 3414705c41ac |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3269e4627918 |
---|---|
1 // $Header: /home/th/Dokumente/Entwicklung/MEIN_CVS/MiniD/src/run/switch_04.d,v 1.1 2004/09/21 22:05:10 th Exp $ | |
2 | |
3 int main(){ | |
4 int test=10; | |
5 | |
6 assert(test==10); | |
7 switch(test){ | |
8 case 11:{ | |
9 test*=test; | |
10 case 10:{ | |
11 test+=2; | |
12 } | |
13 test+=3; | |
14 }case 12:{ | |
15 test+=1; | |
16 break; | |
17 } | |
18 default: test*=2; | |
19 } | |
20 assert(test==16); | |
21 | |
22 return 0; | |
23 } |