Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!newstop!sun!basselope!shiffman From: shiffman%basselope@Sun.COM (Hank Shiffman) Newsgroups: comp.lang.lisp Subject: Re: optional and key arguments Message-ID: <123800@sun.Eng.Sun.COM> Date: 27 Aug 89 01:34:25 GMT References: <64922@linus.UUCP> Sender: news@sun.Eng.Sun.COM Reply-To: shiffman@sun.UUCP (Hank Shiffman) Distribution: comp.lang.lisp Organization: Sun Microsystems, Mountain View Lines: 21 In article <64922@linus.UUCP> bds@mbunix (Smith) writes: >Since we were just burnt by this on a Symbolics, I wonder >if anyone would comment: > >Given the function: > >(defun test (a b &optional (c 0) &key (d 1))... > >(test 5 4 :d 0) results in an error. > Yep. This is just the way things are supposed to work. If you have both optional and keyword arguments, you must provide *all* the optional arguments to get access to any of the optional ones. -- Hank Shiffman (415) 336-4658 Marketing Technical Specialist Software Engineering Technologies ...!sun!shiffman Sun Microsystems, Inc. shiffman@Sun.com