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

Fill pointers and ADJUST-ARRAY

Apologies if this has been discussed before...

The description of ADJUST-ARRAY on pp. 297-8 of CLtL does not say
what happens to a fill pointer when ADJUST-ARRAY is called without
a :FILL-POINTER parameter.  I expected the fill pointer to remain
as it was, but this is not what happens in KCL:

	staffa 18% kcl
	KCl (Kyoto Common Lisp)  June 3, 1987

	>(setq v (make-array 0 :fill-pointer 0 :adjustable t))
	>(adjust-array v 2)
	>(fill-pointer v)
	Error: The vector #(NIL NIL) has no fill pointer.
	Error signalled by FILL-POINTER.

Is KCl's behavior incorrect?

What should happen if an array is adjusted to a size smaller than its
fill pointer?

Jeff Dalton,                      JANET: J.Dalton@uk.ac.ed             
AI Applications Institute,        ARPA:  J.Dalton%uk.ac.ed@nss.cs.ucl.ac.uk
Edinburgh University.             UUCP:  ...!ukc!ed.ac.uk!J.Dalton