On July 12, 2012, Michel Talon wrote
------------------------------------
>If one chooses 0, the program crashes because fact(0) is not defined. The
>solution is simple replace the line with break by
>
>(cond ((zerop n) (break "N is zero.") 1)
>
>so that returning from break sets fact(0)=1, and then one gets (fact 5) ->
>120
>choosing the restart 0 above.
----------------------------------------
I tried your approach (although I realize it was not meant as a solution
to my gcl problem) with the same lisp error and absence of a debugger
prompt.
----------------------------------------------------------
(%i1) to_lisp();
Type (to-maxima) to restart, ($quit) to quit Maxima.
MAXIMA> 1
1
MAXIMA> (defun fact (n)
(cond ((zerop n) (break "N is zero.") 1)
(t (* n (fact (- n 1))))))
FACT
MAXIMA> (fact 5)
Maxima encountered a Lisp error:
N is zero.
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
-------------------------------------------------
Ted