projects
/
rune.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Rune - Fix array passing, optimize constant array indices
[rune.git]
/
tests
/
nested2.d
1
#!/usr/local/bin/rune -x
2
#
3
# nested procedures
4
5
import "sys";
6
import <stdio>;
7
8
alias stdio.File *stdout = stdio.stdout;
9
10
void
11
main()
12
{
13
int i;
14
15
int
16
subfubar(int z)
17
{
18
int j = i * 2 + z;
19
20
int
21
subsubfubar() {
22
int k = j * 2;
23
24
stdout->show("k is", k);
25
if (i == 4) {
26
i = 40;
27
stdout->show("woa nelly (should get 2160)");
28
subfubar(1000);
29
i = 4;
30
}
31
}
32
33
subsubfubar();
34
}
35
36
for (i = 0; i < 10; ++i)
37
subfubar(0);
38
}