Nested Repeat loops

jbv at souslelogo.com jbv at souslelogo.com
Sat Jun 21 02:02:23 EDT 2014


In some cases I managed to replace "repeat for" with
"repeat while" and thus eliminating the flag and the
test on it since the condition is in the repeat loop itself.

jbv

> Wondering if anyone has an elegant way of exiting all the way out of a set
> of nested repeat loops., e.g:
>
> repeat for...
>    repeat for...
>       repeat for....
>          repeat for
>             if ..... then <I want to exit out of the outermost repeat loop
> here>
>          end repeat
>          <do this and that>
>       end repeat
>       <do this and that>
>    end repeat
>    <do this and that>
> end repeat
>
> Right now, I set a flag to true when the exit condition is met then test
> it
> in the <do this and that> stuff.  Works fine but feels a little kludgy.
>
> Pete
> lcSQL Software <http://www.lcsql.com>
> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
> SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>






More information about the use-livecode mailing list