Re: Exit Repeat [Was: [Case Statements]]
Re: Exit Repeat [Was: [Case Statements]]
- Subject: Re: Exit Repeat [Was: [Case Statements]]
- From: Christopher Nebel <email@hidden>
- Date: Tue, 12 Feb 2002 12:15:01 -0800
On Tuesday, February 12, 2002, at 07:14 AM, email@hidden
wrote:
and if you're wondering "what if I want to escape the outer repeat
loop?" ...
What am I missing? Why not just
set checked to false
repeat while checked is false
if myTest is not whatIwant then
set checked to true
end if
end repeat
It seems to me to be the best solution for an exit repeat from within
as many nested ifs as you want.
It's *a* solution, but an exit statement is more concise and makes the
intent clearer. It's a matter of convenience of expression.
Technically, the only control structures you need to write a program are
"if" and "go to", but it makes things a lot more difficult.
Just so folks know, we have enhancement requests filed for both "case"
and "exit repeat."
--Chris Nebel
AppleScript Engineering
_______________________________________________
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.