logic
Translation status: Tiếng Việt reader-locale proof. Term names and code fences follow the vi pack; supporting prose may still be English.
Primitive types logic, trống, and chưa_biết.
Syntax: logic | trống | chưa_biết
Category#
type
Related#
Examples#
radix/corpus/intrinseca/primitiva.fab (canonical · keyword)#
Primitive types logic, trống, and chưa_biết.
# =============================================================================
# logic — Primitive types logic, trống, and chưa_biết
# =============================================================================
#
# What this teaches:
# • Primitive types logic, trống, and chưa_biết.
# • Related keywords: đúng, sai, hàm, ∷, trống
#
# Common mistakes:
# • Using `chưa_biết` where a concrete type is expected — `chưa_biết` is the dynamic dispatch type; use `là` checks or match before extracting.
#
# See also: đúng, sai, hàm, ∷, trống
# =============================================================================
# intrinseca/primitiva — logic, trống, chưa_biết
#
# GRAMMAR:
# typeExpr :← 'logic' | 'trống' | 'chưa_biết'
#
# EXPECTED OUTPUT:
# ping, rỗng_ty est, đúng est, aliud est
#
# BACKEND:
# Cross-ref trống/vacuum.fab for void returns; số/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