User Tools


Accessor FILL-POINTER

Syntax

  • fill-pointer vectorfill-pointer
  • (setf (fill-pointer vector) new-fill-pointer)

Arguments and Values

Description

Accesses the fill pointer of vector.

Examples

(defparameter *array* (make-array 8 :fill-pointer 4))

*ARRAY*

*array*

#(NIL NIL NIL NIL)

(fill-pointer *array*)

4

(dotimes (i (length *array*)) (setf (aref *array* i) (* i i)))

NIL

*array*

#(0 1 4 9)

(setf (fill-pointer *array*) 3)

3

(fill-pointer *array*)

3

*array*

#(0 1 4)

(setf (fill-pointer *array*) 8)

8

*array*

#(0 1 4 9 NIL NIL NIL NIL)

Side Effects

None.

Affected By

None.

Exceptional Situations

Should signal an error of type type-error if vector is not a vector with a fill pointer.

See Also

Notes

There is no operator that will remove a vector's fill pointer.