NextPrevUpTopContentsIndex

6.2.5 Configuring function entry and exit information

:entrycond

Trace keyword

:entrycond form

This option controls the printing of information on entry to a traced function. form is evaluated upon entry to the function, and information is printed if and only if form evaluates to t . This allows you to turn off printing of function entry information by supplying a form of nil , as in the example below.

:exitcond

Trace keyword

:exitcond form

This option controls the printing of information on exit from a traced function. form is evaluated upon exit from the function, and, like :entrycond , information is printed if and only if form evaluates to t . This allows you to turn off printing of function exit information by supplying a form of nil .

An example of using :exitcond and :entrycond is shown below:

  1. For the fac function, set the values of :entrycond and :exitcond as follows.
  2. :entrycond						=> (evenp (car *traced-arglist*))
    :exitcond						=> (oddp (car *traced-arglist*))

    Information is only printed on entry to fac if the argument passed to fac is even. Conversely, information is only printed on exit from fac if the argument passed to fac is odd.

  3. Type the following call to fac in a listener:
CL-USER 12 > (fac 10)

The tracing information printed is as follows:

0 FAC > (10)
    2 FAC > (8)
        4 FAC > (6)
            6 FAC > (4)
                8 FAC > (2)
                  9 FAC < (1)
              7 FAC < (6)
          5 FAC < (120)
      3 FAC < (5040)
  1 FAC < (362880)

LispWorks User Guide - 11 Mar 2008

NextPrevUpTopContentsIndex