// Generated from idltype-base.y - manual changes will be lost
ifdef::sidebartoc[]
include::_Sidebar.adoc[]
endif::[]


























IDL Base types
--------------

The base types of IDL are boolean values, binary values, signed or unsigned
integers, floating point and characters. The chapter on
link:../mappings/index{outfilesuffix}[GenoM IDL mappings] explains how they
map to the actual programming language.

****
[horizontal]
(71) `*base-type-spec        ::=*` ::
   <<grammar#dotgen-rule-boolean-type,`boolean-type`>> +
                              `|` <<grammar#dotgen-rule-integer-type,`integer-type`>> +
                              `|` <<grammar#dotgen-rule-floating-pt-type,`floating-pt-type`>> +
                              `|` <<grammar#dotgen-rule-char-type,`char-type`>> +
                              `|` <<grammar#dotgen-rule-octet-type,`octet-type`>> +
                              `|` <<grammar#dotgen-rule-any-type,`any-type`>>
****







=== Integer types

They represent integer values in the range indicated below.

****
[horizontal]
(72) `*integer-type          ::=*` ::
   <<grammar#dotgen-rule-signed-int,`signed-int`>> +
                              `|` <<grammar#dotgen-rule-unsigned-int,`unsigned-int`>>
(73) `*signed-int            ::=*` ::
   <<grammar#dotgen-rule-signed-longlong-int,`signed-longlong-int`>> +
                              `|` <<grammar#dotgen-rule-signed-long-int,`signed-long-int`>> +
                              `|` <<grammar#dotgen-rule-signed-short-int,`signed-short-int`>>
(74) `*unsigned-int          ::=*` ::
   <<grammar#dotgen-rule-unsigned-longlong-int,`unsigned-longlong-int`>> +
                              `|` <<grammar#dotgen-rule-unsigned-long-int,`unsigned-long-int`>> +
                              `|` <<grammar#dotgen-rule-unsigned-short-int,`unsigned-short-int`>>
(80) `*signed-longlong-int   ::=*` ::
   `"long"` `"long"`
(79) `*signed-long-int       ::=*` ::
   `"long"`
(78) `*signed-short-int      ::=*` ::
   `"short"`
(77) `*unsigned-longlong-int ::=*` ::
   `"unsigned"` `"long"` `"long"`
(76) `*unsigned-long-int     ::=*` ::
   `"unsigned"` `"long"`
(75) `*unsigned-short-int    ::=*` ::
   `"unsigned"` `"short"`
****

.Range of integer types
[width="60%",cols=",2",frame="topbot"]
|========================================================================
|short              | -2^15^ .. 2^15^-1
|long               | -2^31^ .. 2^31^-1
|long long          | -2^63^ .. 2^63^-1
|unsigned short     | 0 .. 2^16^-1
|unsigned long      | 0 .. 2^32^-1
|unsigned long long | 0 .. 2^64^-1
|========================================================================





















=== Floating point types

They represent floating point values. The `float` type represents IEEE
single-precision floating point numbers; the `double` type represents
IEEE double-precision floating point numbers.

****
[horizontal]
(81) `*floating-pt-type      ::=*` ::
   <<grammar#dotgen-rule-float-type,`float-type`>> +
                              `|` <<grammar#dotgen-rule-double-type,`double-type`>>
(82) `*float-type            ::=*` ::
   `"float"`
(83) `*double-type           ::=*` ::
   `"double"`
****










=== Char types

A char data type that is an 8-bit quantity that encodes a single-byte
character.

****
[horizontal]
(84) `*char-type             ::=*` ::
   `"char"`
****







=== Boolean Types

The boolean data type is used to denote a data item that can only take one
of the values TRUE and FALSE.

****
[horizontal]
(85) `*boolean-type          ::=*` ::
   `"boolean"`
****







=== Octet Types

The octet type represents an 8 bit quantity.

****
[horizontal]
(86) `*octet-type            ::=*` ::
   `"octet"`
****







=== Any Types

[CAUTION]
The `any` type is a generic type that can contain any other type. This is
not yet implemented in genom, so you must not use it.

****
[horizontal]
(87) `*any-type              ::=*` ::
   `"any"`
****




// eof
