Andrew Kluthe wrote:
How does exit repeat handle nested repeats? Does it exit the parent repeat
if called from a child repeat in two repeats that are nested in a handler?

         repeat for each key sKey in sData
            repeat for each key sKey2 in sData[sKey]
               exit repeat
            end repeat
         end repeat

"Exit repeat" exits only the loop that statement is in.

You can exit to handler with "exit <handlerName">, or exit all script execution with "exit to top".

But if you need to exit a specific repeat structure, you'll have to add an "exit repeat" for each level you want to exit.

At once of the RevCons a few years ago Robert Cailliau proposed adding an option to name repeats so we can exit any of them from any level. Might be nice to see that one day.

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to