Reverse a list
bobsneidar at iotecdigital.com
Tue Feb 17 16:43:57 CET 2015
Then past posts are incorrect on this matter. It was explicitly stated that the actual memory holding the variable data was “indexed” and that altering the variable data could relocate the variable in memory resulting in invalid data. I have seen this myself. The data returned is garbled nonsense. I don’t think setting the value of the variable back to what it was will correct this.
But I’ve been mistaken before.
On Feb 16, 2015, at 18:05 , Dr. Hawkins <dochawk at gmail.com<mailto:dochawk at gmail.com>> wrote:
On Mon, Feb 16, 2015 at 3:08 PM, Alex Tweedly <alex at tweedly.net<mailto:alex at tweedly.net>> wrote:
That's not quite correct. It doesn't do a single initial complete scan of
the whole variable and keep all the pointers. What it does is (more like)
keep track of how far it has currently processed, and then when it needs
the next line, it scans from that remembered position forward until the
next CR - and then remembers that as the current position.
And if you repeat for each item, and change the itemDel in the loop, you
had *better* remember to change it back before end repeat, or very strange
things happen . . .
Dr. Richard E. Hawkins, Esq.
More information about the use-livecode