Module auto-imported

Primitive types

The primitive types are always in scope. Arithmetic on int is checked: overflow, division by zero and out-of-range shifts panic in every build. float follows IEEE-754 and never panics. byte arithmetic wraps modulo 256 (the compiler warns, E0130). Convert between them with as; see Casts.

Compound types (tuples, arrays, records, classes, enums, function types) are described in the type system page.

Built into the compiler.

Types#

NameDescription
intA 64-bit signed integer, from -9223372036854775808 to 9223372036854775807.
floatA 64-bit IEEE-754 floating-point number.
boolA boolean: true or false.
byteAn unsigned 8-bit integer in 0..=255.
stringA UTF-8 text string.
unitThe type with a single value, (), used where there is no meaningful value.
↑ ↓ navigate ↵ open