summaryrefslogtreecommitdiffhomepage
path: root/snippets/test_snippets/test_struct.nc
diff options
context:
space:
mode:
Diffstat (limited to 'snippets/test_snippets/test_struct.nc')
-rw-r--r--snippets/test_snippets/test_struct.nc20
1 files changed, 20 insertions, 0 deletions
diff --git a/snippets/test_snippets/test_struct.nc b/snippets/test_snippets/test_struct.nc
new file mode 100644
index 0000000..71a9492
--- /dev/null
+++ b/snippets/test_snippets/test_struct.nc
@@ -0,0 +1,20 @@
+extern exit;
+extern malloc;
+
+let construct_foo()
+{
+ let io := 0;
+ io := malloc(4);
+
+ return io;
+}
+
+let main()
+{
+ let io := 0x0;
+ io := construct_foo();
+
+ _ := exit(io);
+
+ return first_number;
+} \ No newline at end of file