We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Expressions can be given a name using the define
define
define PI = 3.14159265 TAU :: define = 6.2831853
ROOT2 == 1.4142135
Since expressions definitions just attach a name to an expression, the expression is reevaluated in context each time it's used.
import basics define COUNTER = getNextCount() func main { print(COUNTER) print(COUNTER) print(COUNTER) } func getNextCount() int { static counter int = 0 return counter++ }
0 1 2
Table of Contents