always statement
always statement
Runs on: either side: the compiler places the statement that calls it where the values it uses live.
Formats:
always [assignment]
always [expression] { [statements] }
always [assignment] { [statements] }
A reactive binding: the assignment (and the block, if any) runs when the statement is reached and again each time
a variable of the expression changes. The assignment must target a simple named variable; with a bare expression
the block is required. Device-side only. (2026-11-01, roadmap S25: until now this statement existed only in the
editor, whose JavaScript translator rewrote it before the compiler saw the code, so that code saved through the MCP
got a syntax error; always_rewriter below now does the same rewrite in the compiler, for every path.)