ToC DocOverview CGDoc RelNotes Index PermutedIndex
Allegro CL
Home Previous Up Next Table of Contents Index
  ANSI Common Lisp   15 Arrays   15.2 Dictionary of Arrays

15.2.19 array-total-size Function

array-total-size array    size

Arguments and Values:
array - an array.

size - a non-negative integer.

Returns the array total size of the array.

 (array-total-size (make-array 4))  4
 (array-total-size (make-array 4 :fill-pointer 2))  4
 (array-total-size (make-array 0))  0
 (array-total-size (make-array '(4 2)))  8
 (array-total-size (make-array '(4 0)))  0
 (array-total-size (make-array '()))  1

Exceptional Situations:
Should signal an error of type type-error if its argument is not an array.

See Also:
make-array, array-dimensions

If the array is a vector with a fill pointer, the fill pointer is ignored when calculating the array total size.

Since the product of no arguments is one, the array total size of a zero-dimensional array is one.

 (array-total-size x)
    ==(apply #'* (array-dimensions x))
    ==(reduce #'* (array-dimensions x))

Allegro CL Implementation Details:

Home Previous Up Next Table of Contents Index
© Franz Inc. 1998-2017 - File last updated 01-11-2017