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

Re: adjust-array



>I have some code (the twist-down stuff) which was posted a while
>back and I modified it for my own purposes. It worked great under
>2.0b1p3 but now refuses to work and culprit is a call to adjust-array
>which resets the pointer to 0:
>
>(adjust-array <whatever> 0)
>
>I imagine this is something that changed in cltl2 and took a while
>to get implemented? How can I get around this problem?

Try:

(adjust-array <whatever> 0 :fill-pointer 0)

You are correct that this was a CLtL2 change. On page 456 it says:
"If the :fill-pointer argument is not supplied, then the fill pointer
of the array is left alone. It is an error to try to adjust the array
to a total size that is smaller than its fill pointer."