• 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: recursion depth
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recursion depth


  • Subject: Re: recursion depth
  • From: John Baltutis <email@hidden>
  • Date: Sun, 9 Oct 2005 14:29:45 -0700

On 10/09/05, Matt Neuburg <email@hidden> wrote:
>
> Okay, let's all test the depth of recursion, please.
>
> on remvix(L, ix)
>     if L is {} then return {}
>     if ix is 1 then
>         return rest of L
>     else
>         return item 1 of L & remvix(rest of L, ix - 1)
>     end if
> end remvix
> set L to {}
> set max to 504
> repeat with x from 1 to max
>     set end of L to x
> end repeat
> remvix(L, max)
>
> OMM, that works, but if "max" is set to 505, we get a stack overflow.
> However, other users report other numbers. So now I'd like to collect some
> more data. Please report what your maximum "max" is (and anything else you
> think might be affecting this - your ram size, for instance?).

->Stack overflow w/max GE 505.
>
> To make this easier, the following *might* be a correct testing algorithm,
> though I'm not entirely certain:

->502 on a G4, 450 MP, 1.5 GB RAM, 10.4.2.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Sending AppleScript to yourself
  • Next by Date: Re: recursion depth
  • Previous by thread: Re: recursion depth
  • Next by thread: Re: recursion depth
  • Index(es):
    • Date
    • Thread