• 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 15:44:52 +0200

At 1:20 PM +0100 29/06/04, Martin Orpen wrote:
>That's given me an idea:
>
> set theList to {}
> repeat with n from 1 to 2499
> set end of theList to n
> end repeat
> set theCount to length of theList
> set text item delimiters to "*"
> set theSum to do shell script "echo '" & theList & "' | bc"

That's way less fragile than the "run script" that I proposed.

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.


References: 
 >Re: Sum of list? (From: Martin Orpen <email@hidden>)

  • Prev by Date: Re: launching a script from a Safari (bookmarklet, javascript, schema, etc)
  • Next by Date: Re: Unix file path problems
  • Previous by thread: Re: Sum of list?
  • Next by thread: Re: Sum of list?
  • Index(es):
    • Date
    • Thread