| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 |
<html> |
| 3 |
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ --> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 6 |
<title>array-element-type (ANSI and GNU Common Lisp Document)</title> |
| 7 |
|
| 8 |
<meta name="description" content="array-element-type (ANSI and GNU Common Lisp Document)"> |
| 9 |
<meta name="keywords" content="array-element-type (ANSI and GNU Common Lisp Document)"> |
| 10 |
<meta name="resource-type" content="document"> |
| 11 |
<meta name="distribution" content="global"> |
| 12 |
<meta name="Generator" content="makeinfo"> |
| 13 |
<link href="index.html" rel="start" title="Top"> |
| 14 |
<link href="Arrays-Dictionary.html" rel="up" title="Arrays Dictionary"> |
| 15 |
<link href="array_002dhas_002dfill_002dpointer_002dp.html" rel="next" title="array-has-fill-pointer-p"> |
| 16 |
<link href="array_002ddimensions.html" rel="prev" title="array-dimensions"> |
| 17 |
<style type="text/css"> |
| 18 |
<!-- |
| 19 |
a.summary-letter {text-decoration: none} |
| 20 |
blockquote.indentedblock {margin-right: 0em} |
| 21 |
div.display {margin-left: 3.2em} |
| 22 |
div.example {margin-left: 3.2em} |
| 23 |
div.lisp {margin-left: 3.2em} |
| 24 |
kbd {font-style: oblique} |
| 25 |
pre.display {font-family: inherit} |
| 26 |
pre.format {font-family: inherit} |
| 27 |
pre.menu-comment {font-family: serif} |
| 28 |
pre.menu-preformatted {font-family: serif} |
| 29 |
span.nolinebreak {white-space: nowrap} |
| 30 |
span.roman {font-family: initial; font-weight: normal} |
| 31 |
span.sansserif {font-family: sans-serif; font-weight: normal} |
| 32 |
ul.no-bullet {list-style: none} |
| 33 |
--> |
| 34 |
</style> |
| 35 |
|
| 36 |
|
| 37 |
</head> |
| 38 |
|
| 39 |
<body lang="en"> |
| 40 |
<span id="array_002delement_002dtype"></span><div class="header"> |
| 41 |
<p> |
| 42 |
Next: <a href="array_002dhas_002dfill_002dpointer_002dp.html" accesskey="n" rel="next">array-has-fill-pointer-p</a>, Previous: <a href="array_002ddimensions.html" accesskey="p" rel="prev">array-dimensions</a>, Up: <a href="Arrays-Dictionary.html" accesskey="u" rel="up">Arrays Dictionary</a> </p> |
| 43 |
</div> |
| 44 |
<hr> |
| 45 |
<span id="array_002delement_002dtype-_005bFunction_005d"></span><h4 class="subsection">15.2.13 array-element-type [Function]</h4> |
| 46 |
|
| 47 |
<p><code>array-element-type</code> <i>array</i> ⇒ <i>typespec</i> |
| 48 |
</p> |
| 49 |
<span id="Arguments-and-Values_003a_003a-325"></span><h4 class="subsubheading">Arguments and Values::</h4> |
| 50 |
|
| 51 |
<p><i>array</i>—an <i>array</i>. |
| 52 |
</p> |
| 53 |
<p><i>typespec</i>—a <i>type specifier</i>. |
| 54 |
</p> |
| 55 |
<span id="Description_003a_003a-432"></span><h4 class="subsubheading">Description::</h4> |
| 56 |
|
| 57 |
<p>Returns a <i>type specifier</i> which represents the <i>actual array element type</i> |
| 58 |
of the array, which is the set of <i>objects</i> that such an <i>array</i> can hold. |
| 59 |
(Because of <i>array</i> <i>upgrading</i>, this <i>type specifier</i> can in |
| 60 |
some cases denote a <i>supertype</i> of the <i>expressed array element type</i> |
| 61 |
of the <i>array</i>.) |
| 62 |
</p> |
| 63 |
<span id="Examples_003a_003a-309"></span><h4 class="subsubheading">Examples::</h4> |
| 64 |
|
| 65 |
<div class="example"> |
| 66 |
<pre class="example"> (array-element-type (make-array 4)) ⇒ T |
| 67 |
(array-element-type (make-array 12 :element-type '(unsigned-byte 8))) |
| 68 |
⇒ <i>implementation-dependent</i> |
| 69 |
(array-element-type (make-array 12 :element-type '(unsigned-byte 5))) |
| 70 |
⇒ <i>implementation-dependent</i> |
| 71 |
</pre></div> |
| 72 |
|
| 73 |
<div class="example"> |
| 74 |
<pre class="example"> (array-element-type (make-array 5 :element-type '(mod 5))) |
| 75 |
</pre></div> |
| 76 |
|
| 77 |
<p>could be <tt>(mod 5)</tt>, <tt>(mod 8)</tt>, <tt>fixnum</tt>, <tt>t</tt>, or any other |
| 78 |
type of which <tt>(mod 5)</tt> is a <i>subtype</i>. |
| 79 |
</p> |
| 80 |
<span id="Affected-By_003a_003a-64"></span><h4 class="subsubheading">Affected By::</h4> |
| 81 |
|
| 82 |
<p>The <i>implementation</i>. |
| 83 |
</p> |
| 84 |
<span id="Exceptional-Situations_003a_003a-141"></span><h4 class="subsubheading">Exceptional Situations::</h4> |
| 85 |
|
| 86 |
<p>Should signal an error of <i>type</i> <b>type-error</b> if its argument is not an <i>array</i>. |
| 87 |
</p> |
| 88 |
<span id="See-Also_003a_003a-353"></span><h4 class="subsubheading">See Also::</h4> |
| 89 |
|
| 90 |
<p><b>array</b>, |
| 91 |
<a href="make_002darray.html">make-array</a> |
| 92 |
, |
| 93 |
<a href="subtypep.html">subtypep</a> |
| 94 |
, |
| 95 |
<a href="upgraded_002darray_002delement_002dtype.html">upgraded-array-element-type</a> |
| 96 |
</p> |
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
</body> |
| 101 |
</html> |