From 23f5ed268667dbcdefaa903c3395ec4c580661b9 Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Tue, 22 Oct 2019 14:33:30 -0400 Subject: fixed constants --- test.toc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'test.toc') diff --git a/test.toc b/test.toc index 3e017db..40ddbe5 100644 --- a/test.toc +++ b/test.toc @@ -5,6 +5,10 @@ puti @= fn(x: int) { #C("printf(\"%ld\\n\", (long)x)"); }; +putf @= fn(x: float) { + #C("printf(\"%f\\n\", (double)x)"); +}; + foo @= fn() int { N := 10; numbers := new(int, N); @@ -17,8 +21,11 @@ foo @= fn() int { }; main @= fn() { - // N @= 5; - // puti(N); + N @= 5; + puti(N); + M @= 1.432; + putf(M); x : [foo()]int; puti(foo()); + }; -- cgit v1.2.3