|
I would assume that there *is* a recursion limit, even if it could never
realistically be reached - there has to be a variable somewhere in the
runtime process which keeps track of the current recursion number, and that
variable will eventually overflow. But by that point, chances are the total
memory limit would have been reached.
In one of my recursion processes where I was worried about limits, I set a
global MaxRecurse variable prior to calling the recursive procedure for the
first time, and the procedure increments a global CurrRecurse variable
(also initialized at the start), and compares to MaxRecurse and drops out
if it's gone 'too deep'... Not hard to do.
On Thu, Feb 14, 2013 at 2:32 PM, Buck Calabro <kc2hiz@xxxxxxxxx> wrote:
On 2/14/2013 5:27 PM, Scott Klement wrote:
Hmmm... well, why would there be a hard number? Seems to me, the natureGood question! Similar to maximum CPU time used, or maximum DASD used,
of a call stack would lend itself to something that doesn't have a hard
number of entries, but rather, a memory limit.
On 2/14/2013 4:21 PM, Buck Calabro wrote:
No wonder Chuck couldn't find a hard number. There does not appear to
be one. The same verbiage is in the 5.4 Reference as well as 7.1.
--buck
an OS might choose to restrict a process to a maximum number of recursions.
--buck
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.