aboutsummaryrefslogtreecommitdiff
path: root/struct.lang
diff options
context:
space:
mode:
Diffstat (limited to 'struct.lang')
-rw-r--r--struct.lang34
1 files changed, 0 insertions, 34 deletions
diff --git a/struct.lang b/struct.lang
deleted file mode 100644
index 00b3442..0000000
--- a/struct.lang
+++ /dev/null
@@ -1,34 +0,0 @@
-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;
-}