• 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: Technical question: subroutine ou submethod?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Technical question: subroutine ou submethod?


  • Subject: Re: Technical question: subroutine ou submethod?
  • From: Walter Ian Kaye <email@hidden>
  • Date: Mon, 15 Sep 2003 04:13:53 -0700

At 11:18a +0200 09/14/2003, Emmanuel didst inscribe upon an electronic papyrus:

At 12:06 AM +0200 13/09/03, Reinforced Darkness wrote:
>consider this script:
>//
>get my compute(this_data)
>on compute(this_data)
>-- anything on this data
>return the_result
>end compute
>//
>
>this one:
>//
>tell me to compute this_data
>to compute this_data
>-- anything on this data
>return the_result
>end to compute
>//
>
>both produce the same task, what's the best to use for speed, memory use...

I don't know for speed nor memory use, but I can tell you for AppleScript syntax: the best is the first one. The second one won't compile I'm afraid.

Well it would have to be 'end compute' not 'end to compute', and it doesn't like direct objects. This will work, though:

tell me to triple for 7

to triple for this_data
3 * this_data
end triple

Does not work for labels in/of/given (i.e., direct objects), but works for prepositions such as for/from/into/above/around, etc.


-boo
_______________________________________________
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: 
 >Technical question: subroutine ou submethod? (From: Reinforced Darkness <email@hidden>)
 >Re: Technical question: subroutine ou submethod? (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: Finding and deleting specific extensions.
  • Next by Date: Re: summary: Weird feature of "if it exists" or?
  • Previous by thread: Re: Technical question: subroutine ou submethod?
  • Next by thread: Address Book's AIM Handle
  • Index(es):
    • Date
    • Thread