5 public delegate void TestDelegate ();
7 static long sum_i
, sum_j
, sum_k
;
10 public static int Test (int p
)
12 TestDelegate d
= null;
13 for (int i
= 1; i
<= 5; i
++) {
14 for (int j
= i
; j
<= 8; j
++) {
16 TestDelegate temp
= delegate {
17 Console
.WriteLine ("i = {0}, j = {1}, k = {2}, p = {3}",
22 sum_p
+= (ulong) (1 << p
);
29 Console
.WriteLine ("SUM i = {0}, j = {1}, k = {2}, p = {3}",
30 sum_i
, sum_j
, sum_k
, sum_p
);
38 if (sum_p
!= 1825434804)
40 sum_i
= sum_j
= sum_k
= 0;
43 Console
.WriteLine ("SUM i = {0}, j = {1}, k = {2}, p = {3}",
44 sum_i
, sum_j
, sum_k
, sum_p
);
52 if (sum_p
!= 18446744073385831629)
57 public static int Main ()
59 int result
= Test (5);
61 Console
.WriteLine ("ERROR: {0}", result
);
63 Console
.WriteLine ("OK");