I’m seeing some strange behavior with O.
It seems like the change to O.INC doesn’t take place until AFTER the next time O is accessed directly. It’s not applied immediately.
If I set O.INC to a new value I would expect that the next time I access O it will change by the O.INC value I set, but instead it changes by the previous O.INC, then applies the new O.INC after the change.
To see what I mean:
INIT
O.MIN 0; O.MAX 5
O.INC 1; O 0
Then access 0 a few times - everything seems fine.
A O
A O
A O
etc.
Weird things happen when you change INC:
A O # A = 0
A O # A = 1
O.INC 2; A O # A = 2
A O # A 4
I was under the impression that statements on a single line will be executed from
right to left but…doesn’t matter if you do it the other way around either:
A O; O.INC 1 # A = 0
A O # A = 1
A O # A = 2
O.INC 2; A O # A = 3
A O # A = 5
Feature or bug? Or perhaps just a misunderstanding of my code?