Types
Complete reference for all types in the Quartz programming language.
Primitive Types
| Type | Size | Range/Values | Default |
|---|---|---|---|
int |
32 bits | -2,147,483,648 to 2,147,483,647 | 0 |
double |
64 bits | ±1.7976931348623157e+308 | 0.0 |
string |
Variable | UTF-8 text | "" |
bool |
1 byte | `true`, `false` | false |
Collection Types
Arrays
Ordered, indexable collections of values.
let numbers = [1, 2, 3, 4, 5];
let first = numbers[0]; // 1
let len = c.length(numbers); // 5
Dictionaries
Key-value mappings with string keys.
let person = {"name": "Alice", "age": 30};
let name = person["name"]; // "Alice"
Function Types
Functions are first-class values in Quartz.
let add = (a, b) => a + b;
let result = add(2, 3); // 5
Class Types
User-defined types created with the class keyword.
class Point {
int x;
int y;
}
let p = new Point();
p.x = 10;
p.y = 20;