Programming language Chora: Data types

Each data member definition (e.g. property or local variable) requires precise information regarding the content it is intended to store at the runtime. With this information, the Chora compiler can determine the right operations to perform on the member when it is initialized or involved as operand within an expressions.

Chora provides a rich set of built-in data types you can additionally extend by your own class, enumeration and set definitions. Following is the overview of the Chora data type system:

Data type

Short description

any

Represents any other data type.

bool

Boolean value true or false.

char

16-bit UNICODE character.

class

Reference to any Chora class.

color

Structure containing red, green, blue and alpha color information.

float

Floating-point number with single precision.

handle

Safe reference to a target system resource.

int8 int16 int32 int64

8, 16, 32 or 64-bit signed integer number.

language

Identification of a language within a localized, multi-lingual application.

object

Reference to an instance of any Chora class.

point

Structure containing x and y information.

rect

Structure containing the coordinates of a rectangle.

slot

Reference to a slot method.

string

16-bit UNICODE string.

styles

Represents any combination of styles within in multi-variant application.

uint8 uint16 uint32 uint64

8, 16, 32 or 64-bit unsigned integer number.

void

Represents 'no data'.

Certain class

Reference to an instance of a certain Chora class.

Enumeration type

Represents one of the values defined in an enumeration member.

Set type

Represents any combination of values defined in a set member.

Property reference

Reference to a property.