From: Robert D. <rob...@ya...> - 2008-02-10 20:11:17
|
Hello, (defun foo (x &aux (y nil)) (declare (special x y)) (format t "~s ~s~%" x y)) (foo 1) => Debugger invoked on condition of type UNBOUND-VARIABLE: The variable X is unbound. That happens in the interpreter and in compiled code also. The presence &AUX seems to be crucial. (defun foo (x &optional (y nil)) (declare (special x y)) (format t "~s ~s~%" x y)) (foo 1) => 1 NIL (defun foo (x y) (declare (special x y)) (format t "~s ~s~%" x y)) (foo 1 2) => 1 2 The presence of DEFVAR makes the problem go away. (defvar x) (defvar y) (defun foo (x &optional (y nil)) (declare (special x y)) (format t "~s ~s~%" x y)) (foo 1) => 1 NIL I'm pretty sure (not 100%) my build of ABCL is up-to-date wrt CVS. Maybe someone can look into this. best, Robert Dodier ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ |