Code reference
Warning
Work in progress
Dialect declaration
To use the code dialect start the module file with this line:
(mod code)
Imports
To import other modules use the use
keyword:
(use module-name)
You can also import multiple modules at once:
(use module-a module-b)
Static variables
Static variables are variables that belong to the global state and are independent from function calls.
The following types are supportet for static variables:
int
: 64-bit signed integeruint
: 64-bit unsigned integerfloat
: 64-bit floating point numberstr
: a string of textbuffer
: a fixed size buffer filled with a specific byteint-array
: an array of 64-bit signed integersuint-array
: an array of 64-bit unsigned integersfloat-array
: an array of 64-bit floating point numbers
Syntax
Static variables are declared at module-level like this:
(static my-variable 42)
Multiple variables can also be declared in one statement:
(static
a "Hello world!"
b 500
)
Buffers
Buffers have the following syntax:
{16} ; length = 16, fill-byte = 0
{-7 10} ; length = 10, fill-byte = -7
Arrays
Arrays are represented by its elements enclosed by square brackets:
[1 2 3 4 5] ; signed integers
[1u 2 3 4 5] ; unsigned integers
[1.0 2.0 3.0] ; floats