You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add single-line (`fn square(x) = x * x`) and multi-line (`fn`/`endfn`) user-defined functions
- `return` inside a function body evaluates and returns an expression
- Functions are called by name as expressions (e.g. `print square(5)`) — no `fn` keyword needed
- Supports nested function calls (e.g. `print add(square(2), square(3))`)
- Supports parameter localisation, control structures within function bodies, and up to 8 levels of nesting
- Eval stack is saved/restored on hardware stack for multi-line calls
- Nesting stacks protect against corruption from recursive calls
- `list` supports `fn` definitions (single-line and multi-line)
- String return values are copied to temp storage before local unwind
- Move error text strings to module page 1 to free ROM space for the new code
0 commit comments