aboutsummaryrefslogtreecommitdiffstats
path: root/source/lang/cpp/built-in-types.rst
blob: f14dce53f64b570a8fcef2e05aec53068dbfb104 (plain)
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
.. highlight:: cpp

.. _lang-built-in-types:

================
 Built-in Types
================

This document serves as a reference for many of the built-in types
which are available when programming in the IDE.  Programmers using
the :ref:`command-line tools <unix-toolchain>` will have access to
these types as long as they have imported `wirish.h
<https://github.com/leaflabs/libmaple/blob/master/wirish/wirish.h>`_;
several are defined in in `libmaple_types.h
<https://github.com/leaflabs/libmaple/blob/master/libmaple/libmaple_types.h>`_.

.. _lang-built-in-types-integral:

Integral types
--------------

.. cpp:type:: char

   8-bit integer value.

.. cpp:type:: short

   16-bit integer value.

.. cpp:type:: int

   32-bit integer value.

.. cpp:type:: long

   32-bit integer value.

.. cpp:type:: long long

   64-bit integer value.

.. cpp:type:: int8

   8-bit integer value.  Synonym for ``signed char``.

.. cpp:type:: uint8

   8-bit unsigned integer value.  Synonym for ``unsigned char``.

.. cpp:type:: byte

   8-bit unsigned integer value.  Synonym for ``unsigned char``.

.. cpp:type:: int16

   16-bit integer value.  Synonym for ``short``.

.. cpp:type:: uint16

   16-bit unsigned integer value.  Synonym for ``unsigned short``.

.. cpp:type:: int32

   32-bit integer value.  Synonym for ``int``.

.. cpp:type:: uint32

   Unsigned 32-bit integer value.  Synonym for ``unsigned int``

.. cpp:type:: int64

   64-bit integer value.  Synonym for ``long long``

.. cpp:type:: uint64

   Unsigned 64-bit integer value.  Synonym for ``unsigned long long``.

Floating-Point Types
--------------------

.. cpp:type:: float

   32-bit, IEEE-754 single-precision floating-point type.

.. cpp:type:: double

   64-bit, IEEE-754 double-precision floating-point type.

Miscellaneous Types
-------------------

.. cpp:type:: voidFuncPtr

   Pointer to a function that takes no arguments and returns nothing, i.e. ::

       typedef void (*voidFuncPtr)(void);

.. cpp:type:: bool

   Boolean type.

Other
-----

.. cpp:type:: void

   Not really a type. To be honest with you, this only exists here to
   silence warnings from our documentation build system.