GURU.error
Henry –
I agree with the other replies, inasmuch as removing the recursive call
will stop the recursion from happening. There are instances, though, where
recursion is the "best" way to get something done. What you're probably
missing is a termination condition – i.e., "I've looked in every direction
already and there's no use looking any more, so return without making the
recursive call". It's still quite possible to overrun your stack this way
(if, for instance, to cover all possibilities you must make more recursive
calls than your stack will allow), so if you set a termination condition in
the recursion and find yourself still running out of stack, you'll probably
want to re-think your algorithm to eliminate most or all recursion. Hope
this helps …
Harry