• 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: Since Apple Listens to this List... [Case Statements]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Since Apple Listens to this List... [Case Statements]


  • Subject: Re: Since Apple Listens to this List... [Case Statements]
  • From: Applescript User Lewis <email@hidden>
  • Date: Wed, 13 Feb 2002 23:22:45 -0700

At 15:08 +1100 14/02/02, Shane Stanley wrote:
On 14/2/02 2:43 PM +1000, Applescript User Lewis,
email@hidden, wrote:

Case of x
Case is y1
-- Do this is x is y1
end -- y1 (this replaces the break)
Case is y2
-- Do this if x is y2
end -- y2
Case is y3
-- Do this if x is y3
end --y3
end -- Case

Which is four lines longer than:

if x is y1
-- Do this is x is y1
else if x is y2
-- Do this if x is y2
else if x is y3
-- Do this if x is y3
end


Well, upon reflection you don't need the end's at all.

(*
note: I'm not a proponent of the Case in AS, I was just giving an example of how it could look and still look like applescript instead of

Case of y {
1 : { this;
and this;
and this };
break;
2 : { this };
break;
default : { this };
}
*)


--
___________________________________________________________________________
| applescript@ & "southgaylord.com"| Unix is very user friendly. It's just |
| I frankly do not believe Micro- | picky about who its friends are. |
| soft has the user's interests at | I want a party where all the women wear|
| heart, or even in mind. | new dresses and the men all drink beer.|
---------------------------------------------------------------------------
_______________________________________________
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.

References: 
 >Re: Since Apple Listens to this List... [Case Statements] (From: Shane Stanley <email@hidden>)

  • Prev by Date: [OFF] Musical Scripters (was: monthNumber)
  • Next by Date: Re: [OFF] Musical Scripters (was: monthNumber)
  • Previous by thread: Re: Since Apple Listens to this List... [Case Statements]
  • Next by thread: Re: Since Apple Listens to this List... [Case Statements]
  • Index(es):
    • Date
    • Thread