6.2 Types

LYRIC defines new type names for integer, character, and floating point numbers.

int8 8 bits signed integer
int16 16 bits signed integer
int32 32 bits signed integer
int64 64 bits signed integer

uint8 8 bits unsigned integer
uint1616 bits unsigned integer
uint3232 bits unsigned integer
uint6464 bits unsigned integer

char8 8 bits character (unsigned)
char1616 bits character (unsigned)
char3232 bits character (unsigned)
char6464 bits character (unsigned, maybe of use someday)

Size Defined as size_t, 32 bits unsigned integer on most systems

Table 6.1: Types defined in Types.hpp

Definitions like BYTE, WORD, DWORD, etc, were intentionally omited. They only introduce confusion, especially for beginers, who can never remember how many bits and bytes data of these types represent. Plus, they are already defined in some development packages (especially for Windows). Let’s name things by their name in LYRIC: the type and the number of bits.

The Size type is extensively used everywhere a size must be given. It is also the prefered type for indexes to reference container items. In LYRIC container idexes start at 0 (zero) and are always positive numbers. Thus Size is very well suited.

  6.2.1 fastmemops