summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-07-11 16:05:49 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2020-07-11 16:05:49 -0400
commit88b8cddabdaaa1bfd6d6f566bcebc38f516227df (patch)
tree39fd2a4691933bd1a62d6cf36fcb88234975b125 /test.toc
parent1c0e87ce47c22512878edef083577aa573fd7876 (diff)
improved the way value memory management works
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc27
1 files changed, 6 insertions, 21 deletions
diff --git a/test.toc b/test.toc
index 86c3855..52399cb 100644
--- a/test.toc
+++ b/test.toc
@@ -1,24 +1,9 @@
#include "std/io.toc", io;
-Point ::= struct {
- x, y: int;
-}
-main ::= fn(){
- a, b: Point;
- b.x = 15;
- b.y = 12;
- a = b;
- a = a;
- c, d: [5]int;
- c[0] = 39;
-
- d = c;
- d = d;
- c = d;
- io.puti(a.x);
- io.puti(a.y);
- io.puti(b.x);
- io.puti(b.y);
- io.puti(c[0]);
- io.puti(d[0]);
+main ::= fn() {
+ file, err := io.fopen_write("test.txt");
+ for i := 0.,1000000 {
+ io.fputs(file, "!");
+ }
+ io.fclose(file);
}
main();