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

fill-pointer



If a vector X has been defined with a fill pointer, then should the
following be valid?
	(SETF (FILL-POINTER X) T)

On page 296 of CLtL, it would seem that it is not valid: 
"SETF may be used with FILL-POINTER to change the fill pointer of a
vector.  The fill pointer of a vector must always be an integer between
zero and the size of the vector (inclusive)."

However, since T is allowed at the time the vector is defined (see page 288),
then why not when changing it?  It would seem convenient to restore a
vector X that has a fill pointer to its full size without having to find its
value with (ARRAY-DIMENSION X 0), or some other comparable function.

Of the implementations that I've looked at, TI allows
(SETF (FILL-POINTER X) T), while KCL and XEROX do not.  CL allowed it,
but erroneously since it actually put T into the fill pointer and that
messed up accesses to X.