aboutsummaryrefslogtreecommitdiff
path: root/struct.lang
blob: 329793987c218f0c10129eb68fe515f482509774 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
type S := struct {
	int x;
	char 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() {
	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;
}