about summary refs log tree commit diff
path: root/examples/5.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/5.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/5.src')
-rw-r--r--examples/5.src9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/5.src b/examples/5.src
index 6ebbb9a..c397759 100644
--- a/examples/5.src
+++ b/examples/5.src
@@ -1,19 +1,20 @@
 /* As you see, the language supports variable scopes */
-extern printf = (*i64, varargs) => i64;
+
+import "!stdlib.src";
 
 let x = 18;
 
 let foo = () => i64 {
 	let x = 1;
-	printf("%d\n", x);
+	println("%d", x);
 	return x;
 };
 
 let main = () => i64 {
-	printf("%d\n", x);
+	println("%d", x);
 	let x = 2;
 	let y = foo();
-	printf("%d\n", x);
+	println("%d", x);
 	return x + y;
 };