aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/demo/demo.odin11
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/demo/demo.odin b/examples/demo/demo.odin
index 5f1e84bbf..6f2a6cf63 100644
--- a/examples/demo/demo.odin
+++ b/examples/demo/demo.odin
@@ -2024,12 +2024,11 @@ relative_data_types :: proc() {
fmt.println(ptr^)
arr := [3]int{1, 2, 3}
- s := arr[:]
- rel_slice: #relative(i16) []int
- rel_slice = s
- fmt.println(rel_slice)
- fmt.println(rel_slice[:])
- fmt.println(rel_slice[1])
+ multi_ptr: #relative(i16) [^]int
+ multi_ptr = &arr[0]
+ fmt.println(multi_ptr)
+ fmt.println(multi_ptr[:3])
+ fmt.println(multi_ptr[1])
}
or_else_operator :: proc() {