From ad062bd0ad547447f74840b89fb0dced35be0fdc Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Wed, 18 Sep 2019 11:36:40 -0400 Subject: improved fn params --- test.toc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'test.toc') diff --git a/test.toc b/test.toc index f3ebac3..be7d33f 100644 --- a/test.toc +++ b/test.toc @@ -1,16 +1,12 @@ #C("#include \n"); -N @= 10; -foo @= fn() [N][N]int { - x : [N][N]int; - x +print_int @= fn(x: int) { + #C("printf(\"%ld\\n\", (long)x);\n"); }; + +times2 @= fn(x: int) int { 5 /* x*/ }; + main @= fn() { - x : [N][N]int = foo(); - #C(" -for (int i = 0; i < 10; i++) - for (int j = 0; j < 10; j++) - printf(\"%ld\", x[i][j]); -puts(\"\"); - "); + print_int(times2(5)); + foo := fn (x, y, z : float, y:double) {}; }; -- cgit v1.2.3