: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
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:
fac
function, set the values of
:entrycond
and
:exitcond
as follows.: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.
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 and Reference Manual - 21 Dec 2011