Values
Holding something, naming it, showing it — enough to finally compute.
Until now, everything your programs wrote was spelled out in the call itself. They held nothing
and computed nothing: the text went straight through Console.print without the program ever
having anything in hand.
This section gives the program something to hold. A value you name, a value you can no longer change, a way to show it, and what Archon does with numbers — including where it does not do what you would expect.
In this section
- 2.1Declaring a value
Naming a value with var, freezing it with const, and the := arrow that sets them.
- 2.2Showing a value
Interpolation — sliding an expression into a text, with nothing assembled by hand.
- 2.3Numbers
Integers and floats, size as a suffix, sign as a prefix — and division, which does not do what you expect.