From e6893fe38972d2869042413a70601e6e40e0c6ab Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Sun, 20 Oct 2019 21:54:12 -0400 Subject: mostly fixed compile time new --- test.toc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'test.toc') diff --git a/test.toc b/test.toc index 8b5c7fc..70c5bd6 100644 --- a/test.toc +++ b/test.toc @@ -6,13 +6,16 @@ // }; foo @= fn() int { - // X := new([100]int); - i := 0; - while i < 100 { + X := new([100]int,5); + asdf : [100]int; + (*(&asdf))[5] = 12; + + + // i := 0; + // while i < 100 { // (*X)[i] = i; - i = i + 1; - } - i + // i = i + 1; + // } // total := 0; // i = 0; // while i < 100 { @@ -20,6 +23,7 @@ foo @= fn() int { // i = i + 1; // } // total + asdf[5] }; main @= fn() { -- cgit v1.2.3