Mercurial > projects > dstress
comparison run/mini/complex1.d @ 1628:c6ef09dfba4d
add mini test set from ldc project
author | Moritz Warning <moritzwarning@web.de> |
---|---|
date | Mon, 10 Jan 2011 19:47:18 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1627:e1b954780837 | 1628:c6ef09dfba4d |
---|---|
1 module complex1; | |
2 | |
3 void main() | |
4 { | |
5 cfloat cf1 = 3f + 0i; | |
6 cfloat cf2 = 4f + 1i; | |
7 cfloat cf3 = func(); | |
8 auto c1 = cf1 + cf2; | |
9 auto c2 = cf2 - cf3; | |
10 auto c3 = cf1 * cf3; | |
11 auto c4 = cf2 / cf3; | |
12 } | |
13 | |
14 cfloat func() | |
15 { | |
16 return 3f + 1i; | |
17 } |