Primitive Data Types

The primitive Data Types available in SmallDragon are used similar to those available in C, and are a subset of those.

Signed Integer Types

Type Width transpiles to
int8 1 byte int8_t
int16 2 bytes int16_t
int32 4 bytes int32_t
int64 8 bytes int64_t
int int (for C compatibility reasons)

Unsigned Integer Types

Type Width transpiles to
uint8 1 byte uint8_t
uint16 2 bytes uint16_t
uint32 4 bytes uint32_t
uint64 8 bytes uint64_t
uint 4 bytes uint32

float

float f = 3.14159;

char

char c = 'k';

bool

bool x = true;

Hex and Binary Literals

uint16 x;
x = 0x0ffb
x = 0b01000101