Home »
Public Forums »
archive »
Recursion
Re: Recursion [message #13030 is a reply to message #12913] |
Tue, 06 October 1998 00:00  |
R. Bauer
Messages: 137 Registered: November 1996
|
Senior Member |
|
|
Martin Vissers wrote:
> To start the monday:
>
> Does anybody know how many times a procedure
> can be called recursively ??
>
> I have a small program which gives problems if its
> called more then 20 times
>
> Hope someone can help me, the manual couldn't
>
The problem is that's in recursivly used procedure all variables inside
will be duplicated as many the routine is called.
For example if you call it 20 times as you say and you like to define
inside an array of 1000 elements then the memory is allocated
20*1000*[type] bytes.
If you have big and many arrays inside your recursive called routine you
will get in trouble.
--
R.Bauer
Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
|
|
|
Current Time: Fri Oct 10 02:18:45 PDT 2025
Total time taken to generate the page: 1.03792 seconds