User Tools


Function VECTOR-POP

Syntax

  • vector-pop vectorelement

Arguments and Values

Description

Decreases the fill pointer of vector by one, and retrieves the element of vector that is designated by the new fill pointer.

Examples

(defparameter *fable* (list 'fable))

*FABLE*

(defparameter *fa* (make-array 8 :fill-pointer 2 :initial-element 'sisyphus))

*FA*

(vector-push *fable* *fa*)

2

(fill-pointer *fa*)

3

(eq (vector-pop *fa*) *fable*)

true

(vector-pop *fa*)

SISYPHUS

(fill-pointer *fa*)

1

Side Effects

The fill pointer is decreased by one.

Affected By

The value of the fill pointer.

Exceptional Situations

An error of type type-error is signaled if vector does not have a fill pointer.

If the fill pointer is zero, vector-pop signals an error of type error.

See Also

Notes

None.