blob: 4f89e520cecd919ed9b92e60cb09d812274565df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
type S := struct {
int x;
char y;
};
S global := {x = 1, y = '!'};
func f(int iets1, S s, int iets2) {
putint(s.x); putc(s.y); putc('\n');
putint(iets1); putc(' '); putint(iets2); putc('\n');
}
func int main() {
global.x = 3 * global.x + int(global.y);
putint(global.x + 1); putc(global.y); putc('\n');
int a := getc();
int b := getc();
getc(); // newline
S ding := {x = 2*a, y = 'a'};
// return ding.x;
f(123, ding, 456);
return int(ding.y) + a + b;
}
|