From: Susan Buchman
Subject: simple question about errors
Date: 
Message-ID: <3C3C6C66.60B70CDD@cs.cmu.edu>
hi all,
 can someone explain the idea behind a "missing value for argument <x>"
error? intuitively, it sounds like an unbound variable error, but it's
clearly something different. i've attempted a web search and looked
through a few books (graham and steele) but haven't found anything of
use. i've even tried to recreate the error at the top level, but no
luck.

i'd appreciate any help, and an small code snipet which recreates the
error would be much appreciated!

thanks.

From: JP Massar
Subject: Re: simple question about errors
Date: 
Message-ID: <3c3c782c.563870327@netnews.attbi.com>
On Wed, 09 Jan 2002 11:14:30 -0500, Susan Buchman <····@cs.cmu.edu>
wrote:

>hi all,
> can someone explain the idea behind a "missing value for argument <x>"
>error? intuitively, it sounds like an unbound variable error, but it's
>clearly something different. i've attempted a web search and looked
>through a few books (graham and steele) but haven't found anything of
>use. i've even tried to recreate the error at the top level, but no
>luck.
>
>i'd appreciate any help, and an small code snipet which recreates the
>error would be much appreciated!
>
>thanks.
>

You'd want to say what Lisp you are using.  Error messages aren't
portable...

Offhand I'd say you have defined a function with, say, 3 arguments,
and are calling it with, say, 2 arguments.  Hence the 3rd argument
is 'missing'.
From: Susan Buchman
Subject: Re: simple question about errors
Date: 
Message-ID: <3C3C7A98.E2270027@cs.cmu.edu>
JP Massar wrote:

> On Wed, 09 Jan 2002 11:14:30 -0500, Susan Buchman <····@cs.cmu.edu>
> wrote:
>
> >hi all,
> > can someone explain the idea behind a "missing value for argument <x>"
> >error? intuitively, it sounds like an unbound variable error, but it's
> >clearly something different. i've attempted a web search and looked
> >through a few books (graham and steele) but haven't found anything of
> >use. i've even tried to recreate the error at the top level, but no
> >luck.
> >
> >i'd appreciate any help, and an small code snipet which recreates the
> >error would be much appreciated!
> >
> >thanks.
> >
>
> You'd want to say what Lisp you are using.  Error messages aren't
> portable...
>

i'm using allegro cl 6.0

>
> Offhand I'd say you have defined a function with, say, 3 arguments,
> and are calling it with, say, 2 arguments.  Hence the 3rd argument
> is 'missing'.

yeah, i tried that but i get a different error, something like "<function>
got  n args, wanted m >n args".

thanks.
From: JP Massar
Subject: Re: simple question about errors
Date: 
Message-ID: <3c3d3789.612866814@netnews.attbi.com>
You'll have to get more specific about what you are doing.
Are you running some application?  Perhaps the application,
and not Allegro itself, is producing this error.

Can you provide a transcript of what you are doing that causes the
error and a backtrace (:zoom) at the point the error happens?




On Wed, 09 Jan 2002 12:15:04 -0500, Susan Buchman <····@cs.cmu.edu>
wrote:

>JP Massar wrote:
>
>> On Wed, 09 Jan 2002 11:14:30 -0500, Susan Buchman <····@cs.cmu.edu>
>> wrote:
>>
>> >hi all,
>> > can someone explain the idea behind a "missing value for argument <x>"
>> >error? intuitively, it sounds like an unbound variable error, but it's
>> >clearly something different. i've attempted a web search and looked
>> >through a few books (graham and steele) but haven't found anything of
>> >use. i've even tried to recreate the error at the top level, but no
>> >luck.
>> >
>> >i'd appreciate any help, and an small code snipet which recreates the
>> >error would be much appreciated!
>> >
>> >thanks.
>> >
>>
>> You'd want to say what Lisp you are using.  Error messages aren't
>> portable...
>>
>
>i'm using allegro cl 6.0
>
>>
>> Offhand I'd say you have defined a function with, say, 3 arguments,
>> and are calling it with, say, 2 arguments.  Hence the 3rd argument
>> is 'missing'.
>
>yeah, i tried that but i get a different error, something like "<function>
>got  n args, wanted m >n args".
>
>thanks.
>
From: Mark Lindeman
Subject: Re: simple question about errors
Date: 
Message-ID: <6d976d43.0201100843.3d9e3d92@posting.google.com>
Susan Buchman <····@cs.cmu.edu> wrote in part,

> > > can someone explain the idea behind a "missing value for argument <x>"
> > >error? 
> > >[...]
> > >i'd appreciate any help, and an small code snipet which recreates the
> > >error would be much appreciated!
>[...]
> i'm using allegro cl 6.0

Susan,

Here's a small debug window snippet that recreates this error under
Allegro CL 5.0.1:

> (defmacro mv (x &optional ((a)))
  `(cons ,x ,a))
MV
> (mv 1)
Error: missing value for argument A
[condition type: SIMPLE-ERROR]
> 

(I found the error message by searching the ACL source code, and then
spent a few minutes with CLTL2 trying to figure out an economical way
of evoking it.)

Hope this helps,
Mark Lindeman
From: Mark Lindeman
Subject: Re: simple question about errors
Date: 
Message-ID: <6d976d43.0201110744.47e87a45@posting.google.com>
I wrote in part,

> Here's a small debug window snippet that recreates this error under
> Allegro CL 5.0.1:
> 
> > (defmacro mv (x &optional ((a)))
>   `(cons ,x ,a))
> MV
> > (mv 1)
> Error: missing value for argument A
> [condition type: SIMPLE-ERROR]

I meant to point out that this error has nothing to do with "cons" or
whatever other function might be used in the macro.  It has to do with
the parsing of the lambda list, as described (with richer examples) on
p. 202 of CLTL2.  Here are two "correct" alternatives to mv, cribbed
mutatis mutandis from CLTL2:

> (defmacro mv1 (x &optional ((&optional a))) `(cons ,x ,a))
MV1
> (mv1 1)
(1)
> (defmacro mv2 (x &optional ((a) '(nil))) `(cons ,x ,a))
MV2
> (mv2 1)
(1)

Mark Lindeman
From: Susan Buchman
Subject: Re: simple question about errors
Date: 
Message-ID: <3C3F3333.816CBE9@cs.cmu.edu>
--------------75FAAB7AC30E2ECADD347D68
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Mark Lindeman wrote:

> Susan,
>
> Here's a small debug window snippet that recreates this error under
> Allegro CL 5.0.1:
>
> > (defmacro mv (x &optional ((a)))
>   `(cons ,x ,a))
> MV
> > (mv 1)
> Error: missing value for argument A
> [condition type: SIMPLE-ERROR]
> >
>
> (I found the error message by searching the ACL source code, and then
> spent a few minutes with CLTL2 trying to figure out an economical way
> of evoking it.)
>
> Hope this helps,
> Mark Lindeman

thanks! i'll play around with it...

--
"Lisa, stop being so suspicious. Did everyone wash their necks like Mr. Burns asked?"



--------------75FAAB7AC30E2ECADD347D68
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Mark Lindeman wrote:
<blockquote TYPE=CITE>Susan,
<p>Here's a small debug window snippet that recreates this error under
<br>Allegro CL 5.0.1:
<p>> (defmacro mv (x &amp;optional ((a)))
<br>&nbsp; `(cons ,x ,a))
<br>MV
<br>> (mv 1)
<br>Error: missing value for argument A
<br>[condition type: SIMPLE-ERROR]
<br>>
<p>(I found the error message by searching the ACL source code, and then
<br>spent a few minutes with CLTL2 trying to figure out an economical way
<br>of evoking it.)
<p>Hope this helps,
<br>Mark Lindeman</blockquote>
thanks! i'll play around with it...
<pre>--&nbsp;
"Lisa, stop being so suspicious. Did everyone wash their necks like Mr. Burns asked?"</pre>
&nbsp;</html>

--------------75FAAB7AC30E2ECADD347D68--