Re: Skip current repeat iteration
Re: Skip current repeat iteration
- Subject: Re: Skip current repeat iteration
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 22 Oct 2002 11:11:32 -0700
On 10/22/02 8:27 AM, "John C. Welch" <email@hidden> wrote:
>
I know this is a simple question, but, how does one go about telling a
>
repeat loop, never mind this one, go on to the next iteration?
>
>
john
The best way, if you have to continue statements below the "move on to next"
point, is to use Ray Robertson's wonderful 'next repeat equivalent for
AppleScript:
repeat with i from 1 to n -- or any other repeat loop type
repeat 1 times
-- lots of stuff
if x = y then
exit repeat -- just the 1 times repeat
end if
--lost more stuff
end repeat
It saves cascades of 'else' clauses and can be a lot neater.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.