Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

trace

trace

type: special form (fsubr)
location: built-in
source file: xlcont.c
Common LISP compatible: similar
supported on: all machines

SYNTAX

(trace  <function> ... )
        <function>      -       an unquoted function

DESCRIPTION

The TRACE special form allows the tracing of user or system functions. TRACE returns a list containing the current set of functions that are being traced. The <function> does not have to be currently defined, it can be created as part of the execution. The trace output consists of entry and exit information. At entry and exit of a traced <function>, lines will be printed of the form:

Entering: <function>, Argument list: <arg-list>  
        .
        .
        .
Exiting: <function>, Value: <ret-value>

EXAMPLES

(defun foo (x) (print (car x)))         ; define FOO
(trace 'foo)                            ; returns (FOO)
(trace 'car)                            ; returns (CAR FOO)
(foo '(a))                              ; Entering: FOO, Argument list: ((A))
                                        ;  Entering: CAR, Argument list: ((A))
                                        ;  Exiting: CAR, Value: A
                                        ; A
                                        ; Exiting: FOO, Value: A
                                        ; returns A

COMMON LISP COMPATIBILITY: The XLISP TRACE function does not support any keyword options, which Common LISP allows.


Go to the first, previous, next, last section, table of contents.