Order independent declaration example

This commit is contained in:
Krzosa Karol
2022-07-28 14:04:33 +02:00
parent d8fda0ff8c
commit 93f984bd96
3 changed files with 80 additions and 4 deletions

View File

@@ -44,7 +44,10 @@ main :: (): int
// After we loop and reassign slice values
// old static_array gets changed
for slice
*it = 2
//
// In this example, operator ';;' is used
// it inserts a new line, allows to write this
// example in a single line
for slice;; *it = 2
assert(static_array[2] == 2)