XLISP > XLISP Plus  -  Previous | Next

debug, nodebug


Type:   -   defined function (closure)
Source:   -   init.lsp

Syntax

(debug)
returns - always returns  T 
(nodebug)
returns - always returns NIL

Description

The 'debug' function sets *breakenable* to  T . This has the effect of turning on the break loop for errors. 'debug' always returns  T .

(defun debug ()
  (setq *breakenable* t))

The 'nodebug' function sets *breakenable* to NIL. This has the effect of turning off the break loop for errors. 'nodebug' always returns NIL.

(defun nodebug ()
  (setq *breakenable* nil))

The default is 'debug' enabled.

Note: These functions are not included in the standard Nyquist distribution. If you want to use them, copy the code above to your 'init.lsp' file.

Examples

(debug)      ; returns T

(+ 1 "a")    ; error: bad argument type
             ; enters break-loop

(clean-up)   ; from within the break-loop

(nodebug)    ; returns NIL

(+ 1 "a")    ; error: bad argument type
             ; but doesn't enter break-loop

  Back to Top


XLISP > XLISP Plus  -  Previous | Next