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

Re: Sum of list?


  • Subject: Re: Sum of list?
  • From: Emmanuel <email@hidden>
  • Date: Tue, 29 Jun 2004 12:31:27 +0200

At 9:15 PM -0400 28/06/04, Graff wrote:
>I don't know of any implementations of summation algorithms that don't do some sort of iteration in order to sum up a 1-D array (list) of integers.

Before "statlist" existed, I used the following to avoid running a loop:

set theList to {1, 2, 3}
set theCount to length of theList
set text item delimiters to "+"
set theSum to run script "" & theList
set theAverage to theSum / theCount

(that's faster than the loop, but not much)

Emmanuel
_______________________________________________
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: Sum of list?
      • From: Martin Orpen <email@hidden>
References: 
 >Sum of list? (From: John Mistler <email@hidden>)
 >Re: Sum of list? (From: Graff <email@hidden>)

  • Prev by Date: Re: Automator in OS 10.4 (Tiger)
  • Next by Date: Re: Sum of list?
  • Previous by thread: Re: Sum of list?
  • Next by thread: Re: Sum of list?
  • Index(es):
    • Date
    • Thread