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/reference/keyword/verum/boolean.fab (canonical · keyword)#
Boolean literals true and false with bool bindings.
main {
let bool enabled ← true
let bool disabled ← false
print enabled
print disabled
print enabled and not disabled
}Expected output:
true
false
true
radix/corpus/reference/keyword/verum/verum.fab (canonical · keyword)#
Represents the true boolean value and can prefix a truthiness check.
test "verum is the true literal" {
let 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 is none` (la `is not none`) — 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 {
let bool active ← true
print active
}Expected output:
true