about summary refs log tree commit diff
path: root/examples/18.src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/18.src')
-rw-r--r--examples/18.src30
1 files changed, 0 insertions, 30 deletions
diff --git a/examples/18.src b/examples/18.src
deleted file mode 100644
index 741a460..0000000
--- a/examples/18.src
+++ /dev/null
@@ -1,30 +0,0 @@
-extern malloc = (i64) => *void;
-extern free = (*void) => void;
-
-import "!stdlib.src";
-
-let main = () => i64 {
-	let x = cast(*i8, malloc(24));
-	(*(x+cast(*i8, 0))) = 10;
-	(*(x+cast(*i8, 1))) = 20;
-	(*(x+cast(*i8, 2))) = 40;
-	printf("%p\n", x);
-	printf("%d\n", *(x+cast(*i8, 0)));
-	printf("%d\n", *(x+cast(*i8, 1)));
-	printf("%d\n", *(x+cast(*i8, 2)));
-	free(cast(*void, x));
-	return 0;
-};
-
-/*
-
-Expected stdout:
-
-${SOMEPOINTER}
-10
-20
-40
-
-Expected return: 0
-
-*/