#: 16430 S12/OS9/68000 (OSK)
13-Sep-92 17:32:48
Sb: #recursive functions
Fm: Jim Sutemeier 70673,1754
To: all C programmers
I have a question regarding recursive use of functions for you C people.
If I recursively call the same function within the function, where will the
system pointer return to when the 2nd call to a function is made???
Example:
func() { /* program coding*/ if (my params exist){
secondfunc();
func();
} /*other continued code*/ }
I have called up the function 'secondfunc() if all conditions exist, and after
secondfunc() runs, I want to run the original func() from it's beginning, with
information that I get from secondfunc().
After secondfunc() runs, then func() runs, does the system pointer then go back
to the end of the func() call, therefore executing rest of the code from my
original call to func()?? If so, I should declare an exit after func().
Any help would be appreciated.
Thanks much for your help!!
jim
There is 1 Reply.
|