bool
Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.
Primitive types bool, void, and unknown.
Syntax: bool | void | unknown
Category#
type
Related#
Examples#
radix/corpus/intrinseca/primitiva.fab (canonical · keyword)#
Primitive types bool, void, and unknown.
# =============================================================================
# bool — Primitive types bool, void, and unknown
# =============================================================================
#
# What this teaches:
# • Primitive types bool, void, and unknown.
# • Related keywords: true, false, fn, ∷, void
#
# Common mistakes:
# • Using `unknown` where a concrete type is expected — `unknown` is the dynamic dispatch type; use `is` checks or match before extracting.
#
# See also: true, false, fn, ∷, void
# =============================================================================
# intrinseca/primitiva — bool, void, unknown
#
# GRAMMAR:
# typeExpr :← 'bool' | 'void' | 'unknown'
#
# EXPECTED OUTPUT:
# ping, none est, true est, aliud est
#
# BACKEND:
# Cross-ref void/vacuum.fab for void returns; int/fractus/textus intrinseca files.
fn ping() → void {
print "primitiva smoke"
}
fn describe(any value) → string {
if value is none then return "nihil est"
return "aliud est"
}
fn describe_boolean(bool value) → string {
if value ≡ true then return "verum est"
return "aliud est"
}
main {
ping()
print describe(null)
print describe_boolean(true)
print describe(42)
}Expected output:
primitiva smoke
nihil est
verum est
aliud est