about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-03-24 01:04:14 +0100
committerBaitinq <[email protected]>2025-03-24 01:04:14 +0100
commit7319e6316697f00c4f49e62b64ef793e6e931178 (patch)
treee8e6315bd69734ff02a305d1d94d8b0984d42bd4
parentFeature: Add initial support for pointers (diff)
downloadinterpreter-7319e6316697f00c4f49e62b64ef793e6e931178.tar.gz
interpreter-7319e6316697f00c4f49e62b64ef793e6e931178.tar.bz2
interpreter-7319e6316697f00c4f49e62b64ef793e6e931178.zip
Examples: Add example of interacting with 3rd party library
-rw-r--r--examples/16.src14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/16.src b/examples/16.src
new file mode 100644
index 0000000..5e7f8a2
--- /dev/null
+++ b/examples/16.src
@@ -0,0 +1,14 @@
+extern printf = (ptr, i64) => i64;
+extern SDL_CreateWindow = (ptr, i64, i64, i64, i64, i64) => i64;
+extern SDL_Init = (i64) => i64;
+
+let main = () => i64 {
+	SDL_Init(1);
+	SDL_CreateWindow("hello world!", 0, 0, 400, 400, 0);
+
+	while true {
+
+	};
+	
+	return 0;
+};