From: Gary King
Subject: Meaning of (declare (values ...))?
Date: 
Message-ID: <40645d8c@news-1.oit.umass.edu>
I recently came across some code using the form (declare (values 
<var-name>*)). I've never seen this before and I'm curious. What does 
this mean?

Thanks,
--
Gary Warren King, Lab Manager
EKSL East, University of Massachusetts * 413 577 0176

In the end, compassion has to be the greatest family value
  -- Billy Bragg

From: Zach Beane
Subject: Re: Meaning of (declare (values ...))?
Date: 
Message-ID: <m3n063h7r6.fsf@unnamed.xach.com>
Gary King <······@cs.umass.edu> writes:

> I recently came across some code using the form (declare (values
> <var-name>*)). I've never seen this before and I'm curious. What does
> this mean?

It probably depends on the implementation, but CMUCL documents that
form here:

   http://www.cis.ksu.edu/VirtualHelp/Info/develop/cmu-user.info.The_Values_Declaration.html

Zach
From: Patrick O'Donnell
Subject: Re: Meaning of (declare (values ...))?
Date: 
Message-ID: <rtd66v4npe.fsf@ascent.com>
Zach Beane <····@xach.com> writes:
> Gary King <······@cs.umass.edu> writes:
> > I recently came across some code using the form (declare (values
> > <var-name>*)). I've never seen this before and I'm curious. What does
> > this mean?
> It probably depends on the implementation, but CMUCL documents that
> form here:
> 
>    http://www.cis.ksu.edu/VirtualHelp/Info/develop/cmu-user.info.The_Values_Declaration.html

Other Lisp implementations have used (declare (values ...)) for other
purposes.  Lisp Machine Lisp, for example, use it as a means of
documenting what the return values of the function mean.  Operations
that display the argument list for the function will also display the
values declaration info:

(defun floor (number &optional (divisor 1))
  (declare (values quotient remainder))
	...)
FLOOR

(arglist 'floor)
(NUMBER &OPTIONAL (DIVISOR 1))
(QUOTIENT REMAINDER)


		- Pat