Kent M Pitman <pitman@world.std.com> wrote:
+---------------
| Peter Seibel <peter@javamonkey.com> writes:
| > >>>>> "Kalle" == Kalle Olavi Niemitalo <kon@iki.fi> writes:
| > Kalle> (multiple-value-call #'values (funcall fn) warning)
| >
| > Duh. Thanks.
|
| I recommend instead:
|
| (values (multiple-value-list (funcall fn)) warning)
|
| The problem is otherwise that if fn has a variable number of
| return values, you'll confuse it.
+---------------
One thing that would help with Kalle's version would be to change
the protocol for SAFE-FUNCALL (or whatever the name was) to swap
the position of the warning/error return value with the function's
value(s):
(multiple-value-call #'values warning (funcall fn))
thus removing the ambiguity. The first value is then *always*
an error-p, and the remaining however-many values (if any) come
from the called function.
-Rob
-----
Rob Warnock, PP-ASEL-IA <rpw3@rpw3.org>
627 26th Avenue <URL:http://www.rpw3.org/>
San Mateo, CA 94403 (650)572-2607