Types
The built-in types of the schema language. What they become in each
language is in the guide, and
their bytes are in each format. Bounds
(T[max N]) are covered in the guide.
bool
true or false, the only two literals of the type.
Integers
Unsigned
| Type | Range |
|---|---|
u8 |
0 to 255 |
u16 |
0 to 65 535 |
u32 |
0 to 2^32 − 1 |
u64 |
0 to 2^64 − 1 |
u128 |
0 to 2^128 − 1 |
Signed
Two's complement.
| Type | Range |
|---|---|
s8 |
−128 to 127 |
s16 |
−32 768 to 32 767 |
s32 |
−2^31 to 2^31 − 1 |
s64 |
−2^63 to 2^63 − 1 |
s128 |
−2^127 to 2^127 − 1 |
Signed integers are written s, not i: i32 is not Comline syntax.
Floats
| Type | Precision |
|---|---|
f32 |
IEEE 754 single precision |
f64 |
IEEE 754 double precision |
Text: string and char
charis one Unicode scalar value: a single character, not a byte or a UTF-16 unit. Its literal is a string of exactly one character,"a"; any other length is a build error.stringis the text type: UTF-8, the built-in name forchar[]. An array ofcharis always text, sochar[max 64]is a string of at most 64 characters, not a list of 64charvalues.strwas an accepted spelling until it was removed. Writing it is now a build error that tells you to usestring.String(capitalised) is not Comline syntax. It is the Rust type thatstringgenerates into, so you see it in generated Rust, never in a.idsfile. Writing it gets the same hint.
()
The unit type: no value, and no bytes on the wire. It's what a function that
waits for its provider but returns nothing gives back, -> (), unlike a
function with no ->, which gets no reply at all
(One-way, or acknowledged).