• 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: Factorial [was Sine of the times...]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Factorial [was Sine of the times...]


  • Subject: Re: Factorial [was Sine of the times...]
  • From: Richard Morton <email@hidden>
  • Date: Mon, 24 Mar 2003 12:12:50 +1100

On Monday, March 24, 2003, at 06:47 AM, Doug McNutt wrote:

5! = 5 * 4 * 3 * 2 * 1 A recursive subroutine to calculate the constants to an arbitrary limit is left as a stack overflowing exercise for the reader.

This, from The FooDooLounge, is an AS version of the classic:

on factorial from n
if n = 0 then return 1
return n * (factorial from (n - 1))
end factorial

Cheers,

Max Factorial
<http://home.netc.net.au/~sunreal/FooDooLounge/>
_______________________________________________
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: Sine of the times: Much better window shaker (From: Doug McNutt <email@hidden>)

  • Prev by Date: Re: How to make a background applet ?
  • Next by Date: Re: Sorting Lists???
  • Previous by thread: Re: Sine of the times: Much better window shaker
  • Next by thread: ASCII & HTML
  • Index(es):
    • Date
    • Thread