#23: RETURN handled differently in interpreted and compiled code ------------------------+--------------------------------------------------- Reporter: ehuelsmann | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: component1 | Version: Keywords: | ------------------------+--------------------------------------------------- Robert Dodier writes:
See below for foobar.lisp.
Interpreted: (foobar) => HELLO 1 NIL
Compiled: (foobar) => HELLO 1 HELLO 2 T
I'm no expert on the CL spec so I don't know which is correct. But I think Maxima expects the behavior shown by interpreted code here.
Thanks for your attention to this.
Robert Dodier
PS. $ cat foobar.lisp (defun blurf () nil)
(defun foobar () (prog (x y z) (declare (ignore x y z)) ((lambda (a b) (declare (ignore a b)) (format t "HELLO 1~%") (cond ((not (blurf)) (return nil)))) nil nil) (format t "HELLO 2~%") (return t)))