Mercurial > projects > dstress
annotate run/out_03.d @ 0:3269e4627918
init dstress
author | svnowner |
---|---|
date | Sat, 25 Sep 2004 22:33:30 +0000 |
parents | |
children | 3414705c41ac |
rev | line source |
---|---|
0 | 1 // $Header: /home/th/Dokumente/Entwicklung/MEIN_CVS/MiniD/src/run/out_03.d,v 1.1 2004/08/23 17:18:35 th Exp $ |
2 | |
3 struct MyStruct{ | |
4 int x=2; | |
5 } | |
6 | |
7 void check(out MyStruct s){ | |
8 assert(s.x==2); | |
9 s.x++; | |
10 } | |
11 | |
12 int main(){ | |
13 MyStruct s; | |
14 s.x=1; | |
15 assert(s.x==1); | |
16 check(s); | |
17 assert(s.x==3); | |
18 return 0; | |
19 } |