about summary refs log tree commit diff
path: root/examples/11.src
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-03-24 00:57:07 +0100
committerBaitinq <[email protected]>2025-03-24 00:57:07 +0100
commit0852417019c6129dc356d84d3bd6cb61d78ba7db (patch)
treef685d41db3175c716fd1f302bc27366067bd028c /examples/11.src
parentFeature: Add support for strings (diff)
downloadinterpreter-0852417019c6129dc356d84d3bd6cb61d78ba7db.tar.gz
interpreter-0852417019c6129dc356d84d3bd6cb61d78ba7db.tar.bz2
interpreter-0852417019c6129dc356d84d3bd6cb61d78ba7db.zip
Feature: Add initial support for pointers
Diffstat (limited to 'examples/11.src')
-rw-r--r--examples/11.src6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/11.src b/examples/11.src
index 5289f9a..8c45c35 100644
--- a/examples/11.src
+++ b/examples/11.src
@@ -1,11 +1,13 @@
+extern printf = (ptr, i64) => i64;
+
 let main = () => i64 {
 	let y = (f: (i64) => i64, x: i64) => i64 {
 		return f(x);
 	};
 
 	let id = (a: i64) => i64 {
-		print(a);
-		print(12);
+		printf("%d", a);
+		printf("%d", 12);
 		return a;
 	};