[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fill pointers and ADJUST-ARRAY
- To: email@example.com@RUTGERS.EDU
- Subject: Re: Fill pointers and ADJUST-ARRAY
- From: David Bein <pyrnj!pyramid!bein@RUTGERS.EDU>
- Date: Tue, 08 Dec 1987 01:11:00 -0000
[ This is in reply to Jeff Dalton's message. The mail system dropped my
last letter to him off into never-never land.]
It would appear that KCL interprets the lack of a :FILL-POINTER
argument to mean that the resulting vector should not have a
fill-pointer. Even though CLtL only mentions what happens when
:FILL-POINTER is supplied to ADJUST-ARRAY, it seems silly that
the resulting vector does not have a fill-pointer when the original one
did. In this regard I think KCL needs to be fixed.
I sent a letter some time back to the mailing list questioning what
the behavior should be if :FILL-POINTER is not specified. Nobody
spoke up, so I'll make my suggestion again. The answer to your
second question (adjusted array being smaller than its current
fill-pointer) is answered in #1 and #2:
I think ADJUST-ARRAY should have the following semantics for its
(1) If :FILL-POINTER is NIL or not supplied, it defaults to the
current value of the vector's fill-pointer.
(2) If :FILL-POINTER is T, then the fill-pointer is set to the
minimum of its current value or the length of the resulting
(3) Otherwise, :FILL-POINTER should be a non-negative integer less than
or equal to the size of the resulting array.
In all cases, an error occurs if the final value of the fill-pointer
is out of bounds.