about summary refs log tree commit diff
path: root/examples/20.src
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-05-18 23:53:59 +0200
committerBaitinq <[email protected]>2025-05-18 23:53:59 +0200
commit3b3ad4a6e6c86ebff2ea19ca5d3e1d0672b76d78 (patch)
treef7880ba5b35732cb9a205d495c04506349f4470c /examples/20.src
parentCodegen: Fix bug with varargs functions (diff)
downloadinterpreter-3b3ad4a6e6c86ebff2ea19ca5d3e1d0672b76d78.tar.gz
interpreter-3b3ad4a6e6c86ebff2ea19ca5d3e1d0672b76d78.tar.bz2
interpreter-3b3ad4a6e6c86ebff2ea19ca5d3e1d0672b76d78.zip
Misc: Use println instead of printf
Diffstat (limited to 'examples/20.src')
-rw-r--r--examples/20.src5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/20.src b/examples/20.src
index 56c694e..9e289f1 100644
--- a/examples/20.src
+++ b/examples/20.src
@@ -1,7 +1,8 @@
-extern printf = (*i64, varargs) => void;
 extern malloc = (i64) => *i64;
 extern free = (*i64) => void;
 
+import "!stdlib.src";
+
 let init_array = (n: i64, arr: *i64) => i64 {
 	let i = 0;
 	while i < n {
@@ -18,7 +19,7 @@ let main = () => i64 {
 
 	let i = 0;
 	while i < n {
-		printf("%d\n", *(arr + i));
+		println("%d", *(arr + i));
 		i = i + 1;
 	};