[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What does this bit of code do?



    Date: Fri, 27 Feb 87 09:57:38 MST
    From: sandra%utah-orion@UTAH-CS.ARPA (Sandra J Loosemore)

    Suppose I define function "foo" like so:

    (defun foo
	(unwind-protect
	    (throw 'silly t)
	    (return-from foo nil)))

    What does (catch 'silly (foo)) return?

    -Sandra
    -------

I say it should return nil.  (I assume that you meant to
have an empty argument list following "defun foo", as otherwise
the function would have a null body, parameters named UNWIND-PROTECT,
THROW, and RETURN-FROM, and supplied-p parameters named T and NIL.)

--Guy