I am sure I have got this expectation totally wrong and need another explanation of why this does not work:
I am trying to create a vector like structure using a list of 2 item var:
x and y are either local or global vars.
After executing the block I get:
Now I want to change the x value:
Why is the vLoc list value not changing, unless I rexecute the
The list will not be updated unless you have a script like
if ((x and y) > 0)
set [vLoc v] to (list (x)(y)).
In Snap!, as in almost all programming languages, the expressions that provide inputs to procedures are evaluated before the procedure is called. So when you say
list x y, the two input expressions
y are evaluated before
list is called. So
list knows only that the values of its inputs are 0 and 0; it has no idea what expressions gave rise to those zeros.