Hi Andrew,

You can use a variable if you want to exit all repeat loops:

         repeat for each key sKey in sData
            repeat for each key sKey2 in sData[sKey]
               put true into myExitAll
               exit repeat
            end repeat
            if myExitAll then
              exit repeat
            end if
         end repeat

Or use a separate handler:

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

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com

Buy my new book "Programming LiveCode for the Real Beginner" http://qery.us/3fi

Fill out this survey please
http://livecodebeginner.economy-x-talk.com/survey/

On 8/1/2013 22:22, 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




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

Reply via email to