• 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: how?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how?


  • Subject: Re: how?
  • From: Paul Scott <email@hidden>
  • Date: Thu, 14 Jan 2010 17:30:08 -0800


On Jan 14, 2010, at 5:06 PM, Chris Page wrote:

Another way to accomplish this is with a local function. AppleScript supports local functions via a slight indirection: you can define local script objects and call their handlers.

<snip>

Unlike a “repeat 1 times” loop, this approach enables the local function to return values, so you don’t have to communicate by setting variables.

Quite right.

On occasion, I've resorted to creating local functions where it makes sense, or aids readability. Sometimes, however, it's nice to keep things in line. Depending on the language and it's optimizations, there could be performance issues with function calls, especially if they become nested.

Paul
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: how? (From: Paul Berkowitz <email@hidden>)
 >Re: how? (From: Paul Scott <email@hidden>)
 >Re: how? (From: Chris Page <email@hidden>)

  • Prev by Date: OT: Dylan availability (was Re: how?)
  • Next by Date: How to Control Garageband With Applescript
  • Previous by thread: Re: how?
  • Next by thread: Re: how?
  • Index(es):
    • Date
    • Thread