Skip to content
Kavachकवच

Literals

● Intermediate2 minSpec 1.7

How each kind of value is written in code: numbers, text, characters and the rest.

Spec 1.7 · learn it in Data Types.

KindExamples
Integer42, 1_000_000, 0xff (hex), 0o644 (octal), 0b1010 (binary)
Float3.14, 1e9, 2.5e-3
Booltrue, false
Char'a', 'क', '\n'
String"Hello, {name}!"
Multi-line string""" … """ (common leading indentation is removed)
Raw stringr"C:\path\{not interpolated}"
Empty optionalnone
spec 1.7 · literals