comparison tests/mini/complex1.d @ 585:fbb1a366cfbc

Complex number should now follow the D ABI on x86. They're also treated as first class values now. Big change.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Tue, 09 Sep 2008 16:49:47 -0700
parents 1bb99290e03a
children
comparison
equal deleted inserted replaced
584:c7d7e2282ba3 585:fbb1a366cfbc
5 cfloat cf1 = 3f + 0i; 5 cfloat cf1 = 3f + 0i;
6 cfloat cf2 = 4f + 1i; 6 cfloat cf2 = 4f + 1i;
7 cfloat cf3 = func(); 7 cfloat cf3 = func();
8 auto c1 = cf1 + cf2; 8 auto c1 = cf1 + cf2;
9 auto c2 = cf2 - cf3; 9 auto c2 = cf2 - cf3;
10 {
11 auto c3 = cf1 * cf3; 10 auto c3 = cf1 * cf3;
12 {
13 auto c4 = cf2 / cf3; 11 auto c4 = cf2 / cf3;
14 }
15 }
16 } 12 }
17 13
18 cfloat func() 14 cfloat func()
19 { 15 {
20 return 3f + 1i; 16 return 3f + 1i;