11-28-2020, 06:05 AM
(This post was last modified: 11-29-2020, 11:29 AM by dale walton.)
I was adding a persistent value 1 as a flag using (remember Value 1) and later removing it with (forget Value 1)
I tried checking to see if my flag was (un)set with
(not (is In 1 (values Remembered)))
and also with
(= 0 (size Array (values Remembered)))
Ultimately, my logic was kicking in after multiple forgets,
(ie after several consecutive moves that contained a (forget Value 1), the tests above turned positive, but not after the first forget.)
so I was wondering whether this means the same value gets remembered multiple times.
If so, it is not what I expected for an unindexed array in which values can only be deleted by referring to them by value. - but maybe this is intended behavior?
If there are multiple instances, is it an ordered list of some sort? FIFO / FILO / value size / other?
If this is intended, can there be a (remember Unique Value 1) syntax to avoid duplication?
Also please clarify the scope (eg whole game, into next turn, current turn, into next move (regardless of turn) move, current move ...) for these values - I am assuming the whole game since they require a forget.)
Also clarify for the scope for the new (set Var "Name" <int>) values -- and how and if they differ in scope from the unnamed (var) (if just into the next move, can the scope be extended by copying the value to itself?
I tried checking to see if my flag was (un)set with
(not (is In 1 (values Remembered)))
and also with
(= 0 (size Array (values Remembered)))
Ultimately, my logic was kicking in after multiple forgets,
(ie after several consecutive moves that contained a (forget Value 1), the tests above turned positive, but not after the first forget.)
so I was wondering whether this means the same value gets remembered multiple times.
If so, it is not what I expected for an unindexed array in which values can only be deleted by referring to them by value. - but maybe this is intended behavior?
If there are multiple instances, is it an ordered list of some sort? FIFO / FILO / value size / other?
If this is intended, can there be a (remember Unique Value 1) syntax to avoid duplication?
Also please clarify the scope (eg whole game, into next turn, current turn, into next move (regardless of turn) move, current move ...) for these values - I am assuming the whole game since they require a forget.)
Also clarify for the scope for the new (set Var "Name" <int>) values -- and how and if they differ in scope from the unnamed (var) (if just into the next move, can the scope be extended by copying the value to itself?