Skip to main content

let, if, and return

Control a bounded handler’s local execution.

Quick reference​

SyntaxBehavior
let name be expressionDeclare an immutable block-local value.
if condition then … else … endBranch on a boolean.
returnStop the handler, running finally cleanup.

Example​

<Button title="Continue" on-press="let ready be true; if ready then emit continued else return end" />

Rules and validation​

Ordinary adjacent commands require semicolons. Compound statements end at their matching end; line breaks do not terminate commands. Locals cannot shadow visible names. Use state for values shared beyond a lexical block. Script comments are unsupported; use XML comments outside attributes.

Expressions · Commands index