There was an error while loading. Please reload this page.
Commonly used expressions can be assigned a name via the define keyword
define
define distance = sqrtf(x * x + y * y)
Since expression definitions just assign a name to an expression, they are re-evaluated each time they are used.
import basics func main { x int = 0 define next_x = ++x repeat 3, print(next_x) }
1 2 3
If this is behavior is undesired, you should use const variable declarations instead.
const
Table of Contents