array shifting
Bobb Fwed
Posts: 1,119
The answer is probably no, but I'll ask anyway.
Is there a way to "shift" an array. For example:
I want to shift everything down one position, so it looks like this:
doing it some other way than this:
Is there a way to "shift" an array. For example:
word test test[noparse][[/noparse] 3 ] := $FF_FF test[noparse][[/noparse] 2 ] := $99_99 test[noparse][[/noparse] 1 ] := $44_44 test[noparse][[/noparse] 0 ] := $11_11
I want to shift everything down one position, so it looks like this:
test[noparse][[/noparse] 3 ] == $00_00 test[noparse][[/noparse] 2 ] == $FF_FF test[noparse][[/noparse] 1 ] == $99_99 test[noparse][[/noparse] 0 ] == $44_44
doing it some other way than this:
test[noparse][[/noparse] 0 ] := test[noparse][[/noparse] 1 ] test[noparse][[/noparse] 1 ] := test[noparse][[/noparse] 2 ] test[noparse][[/noparse] 2 ] := test[noparse][[/noparse] 3 ] test[noparse][[/noparse] 3 ]~
Comments
This won't add the zero at the end. You'll still need: test[noparse][[/noparse] 3 ]~
WORDMOVE "knows" how to correct for movement in either direction in memory when the areas overlap.