diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-07-11 16:05:49 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-07-11 16:05:49 -0400 |
commit | 88b8cddabdaaa1bfd6d6f566bcebc38f516227df (patch) | |
tree | 39fd2a4691933bd1a62d6cf36fcb88234975b125 /test.toc | |
parent | 1c0e87ce47c22512878edef083577aa573fd7876 (diff) |
improved the way value memory management works
Diffstat (limited to 'test.toc')
-rw-r--r-- | test.toc | 27 |
1 files changed, 6 insertions, 21 deletions
@@ -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(); |