Open

Description
Maybe it would be good to insert a table with the datatypes and their length
Group | Type names* | Notes on size / arduino UNO |
---|---|---|
Character types | char | 8-bit (1-byte) 0 to 255 |
word | 16-bit (2-byte) 0 to 65535 | |
Integer types (signed) | signed char | 8-bit (1-byte) -128 to 128 |
signed short int | 16-bit (2-byte) -32,768 to 32,767 | |
signed int | 16-bit (2-byte) -32,768 to 32,767 | |
signed long int | 32-bit (4 bytes) -2,147,483,648 to 2,147,483,647 | |
Integer types (unsigned) | unsigned byte | 8-bit (1-byte) 0 to 255 |
unsigned short int | 16-bit (2-byte) 0 to 65535 | |
unsigned int | 16-bit (2-byte) 0 to 65535 | |
unsigned long int | 32-bit (4 bytes) 0 - 4,294,967,295 | |
Floating-point types | float | 32 bits (4 bytes) -3.4028235E+38 to 3.4028235E+38 |
double | 32 bits (4 bytes) -3.4028235E+38 to 3.4028235E+38 | |
Boolean type | bool | |
Void type | void | no storage |
Null pointer | decltype(nullptr) |
<table class="boxed" style="border-color: #000;" border="0" cellspacing="1" cellpadding="2">
<tbody>
<tr>
<th>Group</th>
<th>Type names*</th>
<th>Notes on size / arduino UNO</th>
</tr>
<tr>
<td rowspan="2">Character types</td>
<td><code><strong>char</strong></code></td>
<td>8-bit (1-byte) 0 to 255</td>
</tr>
<tr>
<td><code><strong>word</strong></code></td>
<td>16-bit (2-byte) 0 to 65535</td>
</tr>
<tr>
<td rowspan="4"><em>Integer types (signed)</em></td>
<td><code><strong>signed char</strong></code></td>
<td>8-bit (1-byte) -128 to 128</td>
</tr>
<tr>
<td><code><em>signed</em> <strong>short</strong> <em>int</em></code></td>
<td>16-bit (2-byte) -32,768 to 32,767</td>
</tr>
<tr>
<td><code><em>signed</em> <strong>int</strong></code></td>
<td>16-bit (2-byte) -32,768 to 32,767</td>
</tr>
<tr>
<td><code><em>signed</em> <strong>long</strong> <em>int</em></code></td>
<td>32-bit (4 bytes) -2,147,483,648 to 2,147,483,647</td>
</tr>
<tr>
<td rowspan="4">Integer types (unsigned)</td>
<td><code><em>unsigned</em><strong> byte</strong></code></td>
<td>8-bit (1-byte) 0 to 255</td>
</tr>
<tr>
<td><code><strong>unsigned short</strong> <em>int</em></code></td>
<td>16-bit (2-byte) 0 to 65535</td>
</tr>
<tr>
<td><code><strong>unsigned</strong> <em>int</em></code></td>
<td>16-bit (2-byte) 0 to 65535</td>
</tr>
<tr>
<td><code><strong>unsigned long</strong> <em>int</em></code></td>
<td>32-bit (4 bytes) 0 - 4,294,967,295<strong><br /></strong></td>
</tr>
<tr>
<td rowspan="2">Floating-point types</td>
<td><code><strong>float</strong></code></td>
<td>32 bits (4 bytes) -3.4028235E+38 to 3.4028235E+38 </td>
</tr>
<tr>
<td><code><strong>double</strong></code></td>
<td>32 bits (4 bytes) -3.4028235E+38 to 3.4028235E+38</td>
</tr>
<tr>
<td>Boolean type</td>
<td><code><strong>bool</strong></code></td>
<td> </td>
</tr>
<tr>
<td>Void type</td>
<td><code><strong>void</strong></code></td>
<td>no storage</td>
</tr>
<tr>
<td>Null pointer</td>
<td><code><strong>decltype(nullptr)</strong></code></td>
<td> </td>
</tr>
</tbody>
</table>
<p> </p>