User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cl:functions:array-element-type [2019/06/15 02:00]
cl:functions:array-element-type [2019/06/19 03:00] (current)
Line 1: Line 1:
 +====== Function ARRAY-ELEMENT-TYPE ======
 +
 +====Syntax====
 +  * **array-element-type** //array// → //​typespec//​
 +
 +====Arguments and Values====
 +  * //array// - an //​[[CL:​Glossary:​array]]//​.
 +  * //​typespec//​ - a //​[[CL:​Glossary:​type specifier]]//​.
 +
 +====Description====
 +Returns a //​[[CL:​Glossary:​type specifier]]//​ which represents the //​[[CL:​Glossary:​actual array element type]]// of the array, which is the set of //​[[CL:​Glossary:​object|objects]]//​ that such an //array// can hold.
 +
 +(Because of //​[[CL:​Glossary:​array]]//​ //​[[CL:​Glossary:​upgrade|upgrading]]//,​ this //​[[CL:​Glossary:​type specifier]]//​ can in some cases denote a //​[[CL:​Glossary:​supertype]]//​ of the //​[[CL:​Glossary:​expressed array element type]]// of the //array//.)
 +
 +====Examples====
 +<​blockquote>​
 +(array-element-type ([[CL:​Functions:​make-array]] 4)) <​r>​[[CL:​Types:​t|T]] </r>
 +(array-element-type ([[CL:​Functions:​make-array]] 12 :​element-type '​([[CL:​Types:​unsigned-byte]] 8))) <​r>//​[[CL:​Glossary:​implementation-dependent]]//​ </r>
 +(array-element-type ([[CL:​Functions:​make-array]] 12 :​element-type '​([[CL:​Types:​unsigned-byte]] 5))) <​r>//​[[CL:​Glossary:​implementation-dependent]]//​ </r>
 +(array-element-type ([[CL:​Functions:​make-array]] 5 :​element-type '​([[CL:​Type Specifiers:​mod]] 5)))
 +<​r>​([[CL:​Type Specifiers:​mod]] 5)
 +//or// ([[CL:Type Specifiers:​mod]] 8)
 +//or// [[CL:​Types:​fixnum]]
 +//or// [[CL:​Types:​t]]
 +;;; or any other type of which ([[CL:Type Specifiers:​mod]] 5) is a //​[[CL:​Glossary:​subtype]]//​.
 +</r>
 +</​blockquote> ​
 +
 +====Affected By====
 +The //​[[CL:​Glossary:​implementation]]//​.
 +
 +====Exceptional Situations====
 +Should signal an error of type **[[CL:​Types:​type-error]]** if its argument is not an //​[[CL:​Glossary:​array]]//​.
 +
 +====See Also====
 +**[[CL:​Types:​array|Type ARRAY]]**, **[[CL:​Functions:​make-array|Function MAKE-ARRAY]]**,​ **[[CL:​Functions:​subtypep|Function SUBTYPEP]]**,​ **[[CL:​Functions:​upgraded-array-element-type|Function UPGRADED-ARRAY-ELEMENT-TYPE]]**
 +
 +====Notes====
 +None.
 +
 +\issue{ARRAY-TYPE-ELEMENT-TYPE-SEMANTICS:​UNIFY-UPGRADING}