Types and variables
Gentee is a strongly-typed language that is why types occupy a very important place in programming in Gentee. All types can be divided into three groups: numeric types, structural types and the reserved type.
All numeric types are built into the language. uint is the most widespread numeric type. The Gentee language has neither pointers nor logic type, the uint performs their functions. The byte, ubyte, short, ushort types are considered as int or uint types (depending on the sign) when arithmetic operations are performed. If you specify them as fields in structural types, they will occupy the corresponding number of bytes.
|Type name||Size of type||Minimum||Maximum||Comments|
|long||8||-2^63||+2^63 - 1||signed|
|ulong||8||0||+2^64 - 1||unsigned|
|float||4||(+ or -)10E-37||(+ or -)10E38||;|
|double||8||(+ or -)10E-307||(+ or -)10E308|
Structure types are defined by the type command. Types string ( str), binary data (buf), collection (collection) are embedded into the language. A lot of types are defined in the standard and other libraries (arrays, hashes etc).
The reserved type is of special significance, which belongs neither to the fundamental types nor to the structure ones. This type is denoted by the array of bytes, which is defined and used as the array. The distinctive feature of the reserved type is that, the memory space is reserved where it has been defined. For example, you can specify a field in a structure reserved field. This means that a memory space of 50 bytes will be reserved in the structure. If you specify the same code inside a function then you reserve 50 bytes in the stack for this local variable. The size of memory reservation allows up to 65 535 bytes. Bear in mind that you should not use an expression in order to specify the required size. It is a constant number that must be enclosed in square brackets.