Paste number 22822: example

Paste number 22822: example
Pasted by: jsnell
2 years, 1 week ago
#lisp | Context in IRC logs
Paste contents:
Raw Source | XML | Display As
ldb (1:15) :/tmp> cat h.lisp
(defun foo (x)
  (declare (optimize (debug 2)))
  (let ((n (1+ x)))
    (print n)
    (print (/ 1 x))
ldb (1:15) :/tmp> sb 0.9.14.8 --load h.lisp
This is SBCL 0.9.14.8, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
(*(foo 0)

1
debugger invoked on a DIVISION-BY-ZERO in thread #<THREAD "initial thread" {10022AEA31}>:
  arithmetic error DIVISION-BY-ZERO signalled
Operation was SB-KERNEL::DIVISION, operands (1 0).
restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(SB-KERNEL::INTEGER-/-INTEGER 1 0)
0] down
(FOO 0)
1] L
N  =  1
X  =  0

1] (sb-debug:var 'N)

1
1]

This paste has no annotations.

Colorize as:
Show Line Numbers

Ads absolutely not by Google

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.