2022-06-06 04:03:40 +02:00
|
|
|
----------------------------------
|
|
|
|
Simple variable assigment
|
|
|
|
----------------------------------
|
2022-10-27 22:32:20 +02:00
|
|
|
x := 10,
|
|
|
|
y := 20,
|
|
|
|
say x,
|
|
|
|
say y,
|
2022-06-06 04:03:40 +02:00
|
|
|
|
2022-10-27 22:32:20 +02:00
|
|
|
x = 30,
|
|
|
|
say x,
|
|
|
|
say y,
|
2022-06-06 04:03:40 +02:00
|
|
|
|
2022-10-27 22:32:20 +02:00
|
|
|
x = y,
|
|
|
|
say x,
|
|
|
|
say y,
|
2022-06-06 04:03:40 +02:00
|
|
|
|
|
|
|
----------------------------------
|
|
|
|
Array updates
|
|
|
|
----------------------------------
|
2022-10-27 22:32:20 +02:00
|
|
|
array := flat 1 2 3,
|
|
|
|
say array,
|
2022-06-06 04:03:40 +02:00
|
|
|
|
2022-10-27 22:32:20 +02:00
|
|
|
array = update array 1 10,
|
|
|
|
say array,
|
2022-06-06 04:03:40 +02:00
|
|
|
|
2022-10-27 22:32:20 +02:00
|
|
|
array = update array 1 (array.2),
|
|
|
|
say array,
|