true
Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.
Represents the true boolean value and can prefix a truthiness check.
Syntax: true [<expression>]
Category#
literal
Related#
Examples#
radix/corpus/literalia/boolean.fab (canonical · keyword)#
Boolean literals true and false with bool bindings.
main {
const bool enabled ← true
const bool disabled ← false
print enabled
print disabled
print enabled and not disabled
}Expected output:
verum
falsum
verum
radix/corpus/verum/verum.fab (canonical · keyword)#
Represents the true boolean value and can prefix a truthiness check.
test "verum is the true literal" {
const bool active ← true
assert active
assert active ≡ true
}
test "verum stands alone as a truthy condition" {
assert true
}
# =============================================================================
# true — Represents the true boolean value and can prefix a truthiness check.
# =============================================================================
#
# What this teaches:
# • Boolean literal — `true` as the canonical `true` value for `bool` type
# • Truthiness prefix — `true` can prefix an expression for explicit truthiness checking
#
# Common mistakes:
# • confusing true (the true literal) with not none (a null check) — true is a boolean value, not a presence test
#
# See also: false, none
# =============================================================================
# true — true literal
#
# GRAMMAR:
# literal :← 'true'
#
# EXPECTED OUTPUT:
# Scalar stdout smoke (see body).
#
main {
const bool active ← true
print active
}Expected output:
verum