annotate tests/mini/nested10.d @ 341:1bb99290e03a trunk

[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
author lindquist
date Sun, 13 Jul 2008 02:51:19 +0200
parents test/nested10.d@25fa34e899e9
children
rev   line source
lindquist@129 1 module nested10;
lindquist@129 2
lindquist@273 3 extern(C) int printf(char*, ...);
lindquist@273 4
lindquist@129 5 void main()
lindquist@129 6 {
lindquist@129 7 int j = 3;
lindquist@129 8 void F()
lindquist@129 9 {
lindquist@129 10 int i = j;
lindquist@129 11 printf("F: i = %d, j = %d\n", i, j);
lindquist@129 12 void G()
lindquist@129 13 {
lindquist@129 14 printf("G: i = %d, j = %d\n", i, j);
lindquist@129 15 j += i;
lindquist@129 16 }
lindquist@129 17 G();
lindquist@129 18 }
lindquist@129 19 F();
lindquist@129 20 printf("6 = %d\n", j);
lindquist@129 21 assert(j == 6);
lindquist@129 22 }