08-27-2009 01:02 PM
The highlighted text shown below should read "... makes a new copy of the array element ..."
This is illustrated in my re-write of the illustrated examples and using "Show Buffer Allocations" included below.
THe balck arrows show where both code constructs have the same number of buffers. THe red arrow shows where a scalalr is being allocated.
I re-wrote the example since neither version should change the contents of the diagram constant so I gave them both a buffer (the Shift Register) to work in.
Ben
08-27-2009 01:57 PM
Is there any way to use this on an array instead of a single number? Let's say I want to replace a subset of an array say for instance, a circular buffer
08-27-2009 02:23 PM
aeastet wrote:Is there any way to use this on an array instead of a single number? Let's say I want to replace a subset of an array say for instance, a circular buffer
According to the Show Buffer Allocations, this constrcut works 100% inplace.
Ben