Next Previous Up Top Contents Index

4.2 Tracing options

4.2.9 Tracing functions from inside other functions

:inside

Trace keyword

:inside list-of-functions

The functions given in the argument to:inside should reference the traced function in their implementation. The traced function is then only traced in calls to any function in the list of functions, rather than in direct calls to itself.

For example:

1. Define the functionfac2, which callsfac, as follows:
(defun fac2 (x)
   (fac x))

2. For thefac function, set the value of:inside tofac2.
3. Callfac, and notice that no tracing information is produced.
CL-USER 154 > (fac 3)
6

4. Callfac2, and notice the tracing information.
CL-USER 155 > (fac2 3)
0 FAC > (3)
  1 FAC > (2)
    2 FAC > (1)
    2 FAC < (1)
  1 FAC < (2)
0 FAC < (6)


LispWorks User Guide - 14 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker