![[LISPWORKS]](/image.pl?url=http%3a%2f%2fwww.lispworks.com%2fdocumentation%2fHyperSpec%2fBody%2f..%2fGraphics%2fLWSmall.gif&f=jpg&w=240)
![[Common Lisp HyperSpec (TM)]](/image.pl?url=http%3a%2f%2fwww.lispworks.com%2fdocumentation%2fHyperSpec%2fBody%2f..%2fGraphics%2fCLHS_Sm.gif&f=jpg&w=240)
Class Precedence List:
Description:
Anarray containsobjects arranged according to a Cartesian coordinate system. Anarray provides mappings from a set offixnums {i0,i1,...,ir-1} to correspondingelements of thearray, where 0 <=ij < dj, r is the rank of the array, and dj is the size ofdimension j of the array.
When anarray is created, the program requesting its creation may declare that allelements are of a particulartype, called theexpressed array element type. The implementation is permitted toupgrade this type in order to produce theactual array element type, which is theelement type for thearray is actuallyspecialized. See thefunctionupgraded-array-element-type.
Compound Type Specifier Kind:
Specializing.
Compound Type Specifier Syntax:
array[{element-type |*} [dimension-spec]]
dimension-spec::= rank |* | ({dimension |*}*)Compound Type Specifier Arguments:
dimension---avalid array dimension.
element-type---atype specifier.
rank---a non-negativefixnum.
Compound Type Specifier Description:
This denotes the set ofarrays whoseelement type,rank, anddimensions match any givenelement-type,rank, anddimensions. Specifically:
Ifelement-type is thesymbol*,arrays are not excluded on the basis of theirelement type. Otherwise, only thosearrays are included whoseactual array element type is the result ofupgradingelement-type; seeSection 15.1.2.1 (Array Upgrading).
If thedimension-spec is arank, the set includes only thosearrays having thatrank. If thedimension-spec is alist ofdimensions, the set includes only thosearrays having arank given by thelength of thedimensions, and having the indicateddimensions; in this case,* matches any value for the correspondingdimension. If thedimension-spec is thesymbol*, the set is not restricted on the basis ofrank ordimension.
See Also:
*print-array*,aref,make-array,vector,Section 2.4.8.12 (Sharpsign A),Section 22.1.3.8 (Printing Other Arrays)
Notes:
Note that the type(array t) is a propersubtype of the type(array *). The reason is that the type(array t) is the set ofarrays that can hold anyobject (theelements are oftypet, which includes allobjects). On the other hand, the type(array *) is the set of allarrays whatsoever, including for examplearrays that can hold onlycharacters. The type(array character) is not asubtype of the type(array t); the two sets aredisjoint because the type(array character) is not the set of allarrays that can holdcharacters, but rather the set ofarrays that are specialized to hold preciselycharacters and no otherobjects.