• 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: Too simple to find an answer for...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Too simple to find an answer for...


  • Subject: Re: Too simple to find an answer for...
  • From: David Andrews <email@hidden>
  • Date: Thu, 29 Jul 2004 22:25:48 -0400

A little less clumsy:

set MyNumberList to {5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2}
set Result01 to 0
repeat with i in MyNumberList
set Result01 to Result01 + i
end repeat

On Jul 29, 2004, at 4:42 PM, Bernardo Hoehl wrote:

I expected a "sum" or summarize to be a reserved word.

This is what I was using:

set Result01 to 0
repeat with i from 1 to the count of MyNumberList
set Result01 to Result01 + (item i of MyNumberList)
end repeat

I thought I was being just too clumsy doing this...

Thanks!

[snip]
_______________________________________________
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: 
 >Fwd: Too simple to find an answer for... (From: Bernardo Hoehl <email@hidden>)

  • Prev by Date: Re: Finder broken
  • Next by Date: Re: Too simple to find an answer for...
  • Previous by thread: Re: Fwd: Too simple to find an answer for...
  • Next by thread: How do I get the decimals?
  • Index(es):
    • Date
    • Thread