Debian Codegraph @

src/doc/old-manual/ansi_arrays.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE book [
3 <!ENTITY % eclent SYSTEM "ecl.ent">
4 %eclent;
5 ]>
6 <book xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
7 <chapter xml:id="ansi.arrays">
8 <title>Arrays</title>
9 <section xml:id="ansi.array-limits">
10 <title>Array limits</title>
11
12 <para>&ECL; arrays can have up to 64 dimensions. Common-Lisp constants
13 related to arrays have the following values in &ECL;.</para>
14 <informaltable>
15 <tgroup cols="2">
16 <thead>
17 <row>
18 <entry>Constant</entry>
19 <entry>Value</entry>
20 </row>
21 </thead>
22 <tbody>
23 <row>
24 <entry>array-rank-limit</entry>
25 <entry>64</entry>
26 </row>
27 <row>
28 <entry>array-dimension-limit</entry>
29 <entry>most-positive-fixnum</entry>
30 </row>
31 <row>
32 <entry>array-total-size-limit</entry>
33 <entry>array-dimension-limit</entry>
34 </row>
35 </tbody>
36 </tgroup>
37 </informaltable>
38 </section>
39
40 <section xml:id="ansi.array-spec">
41 <title>Specializations</title>
42
43 <para>When the elements of an array are declared to have some precise type, such as a small or large integer, a character or a floating point number, &ECL; has means to store those elements in a more compact form, known as a <emphasis>specialized array</emphasis>. The list of types for which &ECL; specializes arrays is platform dependent, but is summarized in the following table, together with the C type which is used internally and the expected size.</para>
44 <informaltable>
45 <tgroup cols="3">
46 <thead>
47 <row>
48 <entry>Specialized type</entry>
49 <entry>Element C type</entry>
50 <entry>Size</entry>
51 </row>
52 </thead>
53 <tbody>
54 <row>
55 <entry><type>bit</type></entry>
56 <entry>-</entry>
57 <entry>1 bit</entry>
58 </row>
59 <row>
60 <entry><type>character</type></entry>
61 <entry><type>unsigned char</type> or <type>uint32_t</type></entry>
62 <entry>Depends on character range</entry>
63 </row>
64 <row>
65 <entry><type>base-char</type></entry>
66 <entry><type>unsigned char</type></entry>
67 <entry></entry>
68 </row>
69 <row>
70 <entry><type>fixnum</type></entry>
71 <entry><type>cl_fixnum</type></entry>
72 <entry>Machine word (32 or 64 bits)</entry>
73 </row>
74 <row>
75 <entry><type>(signed-byte 8)</type></entry>
76 <entry><type>int8_t</type></entry>
77 <entry>8 bits</entry>
78 </row>
79 <row>
80 <entry><type>(unsigned-byte 8)</type></entry>
81 <entry><type>uint8_t</type></entry>
82 <entry>8 bits</entry>
83 </row>
84 <row>
85 <entry><type>(signed-byte 16)</type></entry>
86 <entry><type>int16_t</type></entry>
87 <entry>16 bits</entry>
88 </row>
89 <row>
90 <entry><type>(unsigned-byte 16)</type></entry>
91 <entry><type>uint16_t</type></entry>
92 <entry>16 bits</entry>
93 </row>
94 <row>
95 <entry><type>(signed-byte 32)</type></entry>
96 <entry><type>int32_t</type></entry>
97 <entry>32 bits</entry>
98 </row>
99 <row>
100 <entry><type>(unsigned-byte 32)</type></entry>
101 <entry><type>uint32_t</type></entry>
102 <entry>32 bits</entry>
103 </row>
104 <row>
105 <entry><type>(signed-byte 64)</type></entry>
106 <entry><type>int64_t</type></entry>
107 <entry>64 bits</entry>
108 </row>
109 <row>
110 <entry><type>(unsigned-byte 64)</type></entry>
111 <entry><type>uint64_t</type></entry>
112 <entry>64 bits</entry>
113 </row>
114 <row>
115 <entry><type>single-float</type> or <type>short-float</type></entry>
116 <entry><type>float</type></entry>
117 <entry>32-bits IEEE float</entry>
118 </row>
119 <row>
120 <entry><type>double-float</type></entry>
121 <entry><type>double</type></entry>
122 <entry>64-bits IEEE float</entry>
123 </row>
124 <row>
125 <entry><type>long-float</type></entry>
126 <entry><type>long double</type></entry>
127 <entry>Between 96 and 128 bits.</entry>
128 </row>
129 <row>
130 <entry><type>t</type></entry>
131 <entry><type>cl_object</type></entry>
132 <entry>Size of a pointer.</entry>
133 </row>
134 </tbody>
135 </tgroup>
136 </informaltable>
137
138 <para>Let us remark that some of these specialized types might not exist in your platform. This is detected using conditional reading and features (See <xref linkend="ansi.numbers.c-types"/>).</para>
139 </section>
140
141 <xi:include href="ref_c_arrays.xml" xpointer="ansi.arrays.c-dict" xmlns:xi="http://www.w3.org/2001/XInclude"/>
142
143 </chapter>
144 </book>