Subject: Re: best way to pass 2 numbers
From: rpw3@rpw3.org (Rob Warnock)
Date: Fri, 08 Aug 2008 06:49:52 -0500
Newsgroups: comp.lang.lisp
Message-ID: <1dWdnb7J_KZ9rwHVnZ2dnUVZ_jSdnZ2d@speakeasy.net>
<kodifik@eurogaran.com> wrote:
+---------------
| I would like to pose a (not so) simple question:
| Suppose you have a function that yields 2 integers (fixnums). Some
| possible mechanisms to return them to its caller would be:
| - values. Both fixnums are ALWAYS necessary, so this doesn't seem an
| adequate option in this case.
+---------------

While true for Scheme, this is simply incorrect for Common Lisp.
In CL, excess return values are silently ignored:

    > (+ 3 (values 4 13))

    7
    > 

Just use VALUES.


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607