Reference
Language Reference
A compact index of the syntax supported by the current native compiler.
Values
| Value | Example |
|---|---|
| Integer | 42 |
| Float | 3.14 |
| Boolean | true |
| String | "Tekst" |
| None | None |
| List | [1, 2, 3] |
| Tuple | (1, 2) |
| Dictionary | {"name": "Tekst"} |
Statements
| Syntax | Purpose |
|---|---|
if / elif / else | Conditional execution |
while | Conditional loop |
for ... in | Iteration |
try / catch | Handle runtime errors |
fn | Function and method declaration |
class | Class declaration |
use module | Load a module |
from module use name | Load a selected name |
import / from ... import | Legacy module syntax, retained for compatibility |
return | Return a value from a function |
To handle a runtime failure, put the operation in a try: block and follow it with a catch: block. See Error Handling for examples.
Built-ins
| Built-in | Purpose |
|---|---|
print | Write output |
input | Read input |
int | Convert to integer |
float | Convert to float |
str | Convert to string |
bool | Convert to boolean |
len | Get length |
range | Create a numeric range for iteration |
Operators
Arithmetic uses +, -, *, /, and %. Comparisons use ==, !=, <, <=, >, and >=. Logical expressions use and and or.
Pointers
&x, *p, alloc, free, load_int, store_int, load_byte, and store_byte expose the explicit memory layer.
