Re: Recursion and Stack overflow
Re: Recursion and Stack overflow
- Subject: Re: Recursion and Stack overflow
- From: "Stockly, Ed" <email@hidden>
- Date: Thu, 03 Dec 2009 11:00:51 -0800
- Thread-topic: Recursion and Stack overflow
The number and size of variables in the recursively called handler and the
number of times the handler is called are what cause stack overflows. Each
recursion uses more memory and the the stack overflow error means all the
available memory is full.
There are ways to minimize the amount of memory dedicated to each
recursion.I think we need to see more of the script to diagnose the problem.
ES
On 12/3/09 10:49 AM, "Justin Laden" wrote:
>
> if contents of i is 1 then
>
> --return shortest path through assembly line
> display dialog "done"
> else
> --make the recursive call
> set item i of List1 to (minNum((recAssem((item (i - 1) of List1)) +
> (item i of L1T)), (recAssem((item (i - 1) of List2)) + (item (i - 1)
> of TT2) + (item i of L1T))))
> end if
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden