Composite Types
Structs
Basic Structure Definition
point :: struct {
x -> double
y -> double
}
color :: struct {
r -> byte
g -> byte
b -> byte
a -> byte
}Creating and Using Structs
% Creating instances
origin: point = point {
x -> 0,0
y -> 0,0
}
% Accessing fields
x_coord: double = origin.xNested Structures
Last updated