Reverse a list

Geoff Canyon gcanyon at gmail.com
Wed Feb 18 15:39:58 EST 2015


On Tue, Feb 17, 2015 at 4:33 PM, Alex Tweedly <alex at tweedly.net> wrote:

> Though it would be kinda cool to do a quick LC simulation showing visible
> "animation" of the variable and index as it goes through the loop.
>

I did something like this:

https://dl.dropboxusercontent.com/u/41182876/foreach.livecode

It shows a field and parses through the field, highlighting each character
in blue as it considers it, and marking CR in red.

It has two buttons, one which simulates repeat for each line, another which
simulates repeat with i = 1 to the number of lines. It then does something
with each line.

It logs the actual thing it is doing at each step along the way, so you can
see the difference in steps taken, and gives an overall time for each
simulation.



More information about the use-livecode mailing list