macro values can be a cycle behind when clocking #90
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It seems as though the problem is the evaluate_at does not force the newly clocked values and can be evaluated on the previous cycle's values.
Actually that's not the problem. The difficulty is that cross-references, even in the "base" contents of a cell, refer to the previous cycle's values in a clock update. The simplest example is
R(up)
. This is the value of the cell directly above. In the base state, it correctly reflects the updated/current value of the cell above. When "clocking", however, all references, including this one, produce the value on the last cycle. So if the above cell has clocked contents like@+1
that will make it increment by 1, after clocking once theR(up)
cell will still show the base contents of the above cell. Only after clocking twice will theR(up)
cell show the above cell after being clocked once, and so on for all further iterations, theR(up)
cell will always show the contents of the above cell on the previous cycle.The problem only becomes worse with further links in the reference chain, e.g. an
R(up)
referring toR(up)
referring to a cell with clocked contents will end up perpetually two clock cycles behind.The solution seems conceptually simple although the implementation is not entirely clear: references inside the clocked cell contents should be to the previous clock cycle whereas inside the base cell contents should be to the current clock cycle.