mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 19:03:13 +01:00
21 lines
313 B
D
21 lines
313 B
D
module nested10;
|
|
|
|
void main()
|
|
{
|
|
int j = 3;
|
|
void F()
|
|
{
|
|
int i = j;
|
|
printf("F: i = %d, j = %d\n", i, j);
|
|
void G()
|
|
{
|
|
printf("G: i = %d, j = %d\n", i, j);
|
|
j += i;
|
|
}
|
|
G();
|
|
}
|
|
F();
|
|
printf("6 = %d\n", j);
|
|
assert(j == 6);
|
|
}
|