musique/examples/assigments-state-management.mq
Robert Bendun ddf9cc8f8c New declaration syntax x := foo instead of var x = foo
Additionaly moving into multiparameter binary operations
2022-09-18 14:50:20 +02:00

28 lines
375 B
Plaintext

----------------------------------
Simple variable assigment
----------------------------------
x := 10;
y := 20;
say x;
say y;
x = 30;
say x;
say y;
x = y;
say x;
say y;
----------------------------------
Array updates
----------------------------------
array := flat 1 2 3;
say array;
array = update array 1 10;
say array;
array = update array 1 (array.2);
say array;