in reply to Re^3: Debug recursion ?
in thread Debug recursion ?
Start the program under the debugger and issue the following command : c 10 ( this should run the debugger to the 10th line , the one with print "\nOk\n" ) Instead , i receive the following message "100 levels deep in subroutine calls!" and using r can't return from the function.sub fact { my $n=shift; if($n==0 || $n==1) { return 1; } return $n*fact($n-1); } print fact(107); print "\nOk\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Debug recursion ?
by GrandFather (Saint) on Feb 25, 2007 at 00:42 UTC | |
|
Re^5: Debug recursion ?
by diotalevi (Canon) on Feb 25, 2007 at 00:32 UTC |