• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Exit Repeat [Was: [Case Statements]]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Exit Repeat [Was: [Case Statements]]
      • From: email@hidden (Michael Sullivan)
    • Re: Exit Repeat [Was: [Case Statements]]
      • From: Paul Berkowitz <email@hidden>
References: 
 >Exit Repeat [Was: [Case Statements]] (From: "email@hidden" <email@hidden>)

  • Prev by Date: Opening default browser and mailer in Mac OS X 10.1?
  • Next by Date: Re: Exit Repeat [Was: [Case Statements]]
  • Previous by thread: Re: Exit Repeat [Was: [Case Statements]]
  • Next by thread: Re: Exit Repeat [Was: [Case Statements]]
  • Index(es):
    • Date
    • Thread