How will longfill overwrite in this program?
jacksons
Posts: 7
If I have a program such as this:
I was wondering if longfill would actually shift the array or overwrite it in an unexpected way.
VAR long buffer[100] PUB main long sensorval := 'get sensor reading longmove(@buffer+1, @buffer, 99) buffer[0] = sensorval
I was wondering if longfill would actually shift the array or overwrite it in an unexpected way.
Comments
EDIT: You did mean to say longmove, and not longfill in your last sentence, right?
electrodude
EDIT: This is what happens when I load twenty tabs and end up taking so long to read them all that I get ninja'd by 7 minutes. Maybe I should reload before posting next time...
I used to frequently make use of the move statements until Phil exhorted someone doing the same to learn to use a circular buffer. Since taking Phil's advice (to someone else) I find I don't need to shift buffers with "move" statements much.