Skip to content

Primitives

Benjamin Dupont edited this page Aug 18, 2020 · 2 revisions

Numbers

Number literals can be expressed using different bases.

10     -> decimal
0xA    -> hexadecimal
0b1010 -> binary

Separators can also be used between digits.

1_000_000
0xFF_0A_00
0b1011001_11111001_0001010

Strings

Strings use double quotes.

"Hello, world !"

Escape codes include \n, \t, \\ and \u<codepoint>.

Interpolation

String interpolation is possible using the $ character.

"My name is $name, and I was ${age - 1} years old last year."
Clone this wiki locally