aboutsummaryrefslogtreecommitdiff
path: root/examples/pointer.sloth
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pointer.sloth')
-rw-r--r--examples/pointer.sloth5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/pointer.sloth b/examples/pointer.sloth
new file mode 100644
index 0000000..7d7ca10
--- /dev/null
+++ b/examples/pointer.sloth
@@ -0,0 +1,5 @@
+fn main() Int {
+ val x: Int = 0;
+ val xPtr: Int = *x;
+ val x: Int = @xPtr;
+} \ No newline at end of file