ToC DocOverview CGDoc RelNotes Index PermutedIndex
Allegro CL
Home Previous Up Next Table of Contents Index
  ANSI Common Lisp   17 Sequences   17.3 Dictionary of Sequences

17.3.11 length Function

Syntax:
length sequence    n

Arguments and Values:
sequence - a proper sequence.

n - a non-negative integer.

Description:
Returns the number of elements in sequence.

If sequence is a vector with a fill pointer, the active length as specified by the fill pointer is returned.

Examples:
 (length "abc")  3
 (setq str (make-array '(3) :element-type 'character 
                            :initial-contents "abc"
                            :fill-pointer t))  "abc"
 (length str)  3
 (setf (fill-pointer str) 2)  2
 (length str)  2

Exceptional Situations:
Should be prepared to signal an error of type type-error if sequence is not a proper sequence.

See Also:
list-length, sequence

Allegro CL Implementation Details:
None.

Home Previous Up Next Table of Contents Index
© Franz Inc. 1998-2019 - File last updated 02-07-2019