Exit all?
Posted: Sun Jun 22, 2014 4:16 am
				
				This came up in the use list.
Consider the addition of a command to exit a nested repeat loop:
Now this can be effected if the entire loop structure is migrated to its own handler. In that case it is possible to exit the handler itself, which essentially does the same thing. But this is not always simple or desirable.
Perhaps it might be useful to have the option to exit a fixed number of layers:
Thoughts?
Craig Newman
			Consider the addition of a command to exit a nested repeat loop:
Code: Select all
repeat with... --top level
  repeat with... --second level
    repeat with...  --third level
      repeat with...   --fourth level
        exit repeat "all" --would bring the entire nest down
      end repeat
    end repeat
  end repeat
end repeatPerhaps it might be useful to have the option to exit a fixed number of layers:
Code: Select all
exit repeat "2" --the "2" being the repeat layer number (or perhaps the number of layers "upwards"?).Craig Newman