annotate test/complex1.d @ 104:4d1e9eb001e0 trunk

[svn r108] Now basic suppport for complex types. =,+,-,*,/ are supported.
author lindquist
date Mon, 19 Nov 2007 02:58:58 +0100
parents 16e88334bba7
children
rev   line source
lindquist@90 1 module complex1;
lindquist@90 2
lindquist@90 3 void main()
lindquist@90 4 {
lindquist@104 5 cfloat cf1 = 3f + 0i;
lindquist@104 6 cfloat cf2 = 4f + 1i;
lindquist@104 7 cfloat cf3 = func();
lindquist@104 8 auto c1 = cf1 + cf2;
lindquist@104 9 auto c2 = cf2 - cf3;
lindquist@104 10 {
lindquist@104 11 auto c3 = cf1 * cf3;
lindquist@104 12 {
lindquist@104 13 auto c4 = cf2 / cf3;
lindquist@104 14 }
lindquist@104 15 }
lindquist@90 16 }
lindquist@104 17
lindquist@104 18 cfloat func()
lindquist@104 19 {
lindquist@104 20 return 3f + 1i;
lindquist@104 21 }