Thanks, 19b-pre2 worked. But why is it necessary to compile the function (otherwise no recursive tracing)? I would rather expect the other way round.
Sometimes during development I do not compile immediately (esp. if function is generated on-line). Is it possible to trace interpreted function? Regards, Zbyszek Jurkiewicz On Thu, 6 Oct 2005, Raymond Toy wrote: >>>>>> "Zbyszek" == Zbyszek Jurkiewicz <[EMAIL PROTECTED]> writes: > > Zbyszek> How to force trace to trace recursive calls? > > Zbyszek> (Simplified) example: > > Zbyszek> * (defun silnia (n) (if (= n 1) 1 (* n (silnia (- n 1))))) > > Zbyszek> SILNIA > Zbyszek> * (trace silnia) > > Zbyszek> (SILNIA) > Zbyszek> * (silnia 4) > > Zbyszek> 0: (SILNIA 4) > Zbyszek> 0: SILNIA returned 24 > Zbyszek> 24 > > You can grab a newer version of cmucl like, say, the most recent > snapshot from common-lisp.net: > > CL-USER> (defun silnia (n) (if (= n 1) 1 (* n (silnia (- n 1))))) > SILNIA > CL-USER> (compile 'silnia) > ; Compiling LAMBDA (N): > ; Compiling Top-Level Form: > SILNIA > NIL > NIL > CL-USER> (trace silnia) > (SILNIA) > CL-USER> (silnia 4) > 0: (SILNIA 4) > 1: (SILNIA 3) > 2: (SILNIA 2) > 3: (SILNIA 1) > 3: SILNIA returned 1 > 2: SILNIA returned 2 > 1: SILNIA returned 6 > 0: SILNIA returned 24 > 24 > > Ray > >
