Node:Assignment, Next:System interface, Previous:Records, Up:Top
An assignable variable is an object that has changable state.
NEW
creates a new assignable object.
Its value can be changed with the assignment operator:
:v = NEW
v := 10
:u = NEW
u := v + 5
V value
extracts the current value of V.
The :=>
operator is as follows:
V :=> a ... z
assigns V to a,
the old value of a to b, and so on, finishing by
assigning the old value of y to z.
The returned value is the old value of z.
All of the assignments are done in parallell.
To increment an assignable variable, use the +:=
contructor,
as in x +:= 2
or x(+:=)1
.
This is a special of :=
used as a postfix operator,
where the operand is a function. In that case,
v F:= x1 .. xn
is the same as:
v := ((v value) F x1 .. xn)
except that v is only evaluated once.