about summary refs log tree commit diff
path: root/examples/17.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/17.src
parentCodegen: Fix bug with varargs functions (diff)
downloadpry-lang-3b3ad4a6e6c86ebff2ea19ca5d3e1d0672b76d78.tar.gz
pry-lang-3b3ad4a6e6c86ebff2ea19ca5d3e1d0672b76d78.tar.bz2
pry-lang-3b3ad4a6e6c86ebff2ea19ca5d3e1d0672b76d78.zip
Misc: Use println instead of printf
Diffstat (limited to 'examples/17.src')
-rw-r--r--examples/17.src7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/17.src b/examples/17.src
index 2871f46..779ff74 100644
--- a/examples/17.src
+++ b/examples/17.src
@@ -1,12 +1,13 @@
-extern printf = (*i64, varargs) => void;
 extern malloc = (i64) => *i64;
 extern free = (*i64) => void;
 
+import "!stdlib.src";
+
 let main = () => i64 {
 	let x = malloc(8);
 	*x = 10;
-	printf("%p\n", x);
-	printf("%d\n", *x);
+	println("%p", x);
+	println("%d", *x);
 	free(x);
 	return 0;
 };