diff options
Diffstat (limited to 'struct.lang')
-rw-r--r-- | struct.lang | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/struct.lang b/struct.lang index 3297939..5bd38c4 100644 --- a/struct.lang +++ b/struct.lang @@ -3,12 +3,16 @@ type S := struct { 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 |