[99cb07]: ansi_arrays.xml Maximize Restore History

Download this file

ansi_arrays.xml    144 lines (138 with data), 4.5 kB

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