blob: 00b344246696fe856e9fcd0f878091d97fff4ce4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
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);
S ding2 := ding;
ding2.x = ding2.x;
// ding2.y = ding2.y;
f(234, ding2, 567);
return int(ding.y) + a + b;*/
int a := getc();
getc(); // newline
S ding := {x = 2*a, y = 'a'};
S ding2 := ding;
f(123, ding2, 456);
return 0;
}
|