The type of an object serves two purposes:
- It expresses what operations can be applied to the objects
in question. In a way, it controls that apples cannot be added
to oranges;
- It determines the internal representation of values in
the computer's memory.
There are four basic types in Elan, denoted in program texts
by the keywords:
- <#1558#>INT <#1558#>
integral numbers in the range -2147483647 to 2147483647;
- <#1559#>REAL <#1559#>
real numbers in a precision of 14 decimals;
- <#1560#>BOOL <#1560#>
truth values, true and false; and
- <#1561#>TEXT <#1561#>
sequences of characters.
Furthermore, objects of any type can be composed into one dimensional
rows. These composed types are discussed in the subchapter on
rows.