[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binding the same variable twice in a single form



Let's say I have a function FUNC that returns three values.  In a
particular situation I need only the third value.  On the
Symbolics I could write

	(MULTIPLE-VALUE-BIND (IGNORE IGNORE X) (FUNC)
		<use X somehow>)

The question is whether this usage is portable.  Other Common Lisp
implementations may treat IGNORE as an ordinary variable name, and
thereby interpret the expression as binding the same variable
twice in the same form.  The Symbolics allows this silently in any
case, even an obvious one like

	(LET ((A 3) (A 4)) A)

But do other CL implementations act similarly?  Does the upcoming
ANSI standard address this question?


	Lawrence G. Mayka
	AT&T Bell Laboratories
	lgm@ihlpf.att.com

Standard disclaimer.