ตรรกะ
Translation status: ภาษาไทย reader-locale proof. Term names and code fences follow the th-TH pack; supporting prose may still be English.
Primitive types ตรรกะ, เปล่า, and ไม่รู้.
Syntax: ตรรกะ | เปล่า | ไม่รู้
Category#
type
Related#
Examples#
radix/corpus/intrinseca/primitiva.fab (canonical · keyword)#
Primitive types ตรรกะ, เปล่า, and ไม่รู้.
# =============================================================================
# ตรรกะ — Primitive types ตรรกะ, เปล่า, and ไม่รู้
# =============================================================================
#
# What this teaches:
# • Primitive types ตรรกะ, เปล่า, and ไม่รู้.
# • Related keywords: จริง, เท็จ, ฟังก์ชัน, ∷, เปล่า
#
# Common mistakes:
# • Using `ไม่รู้` where a concrete type is expected — `ไม่รู้` is the dynamic dispatch type; use `เป็น` checks or match before extracting.
#
# See also: จริง, เท็จ, ฟังก์ชัน, ∷, เปล่า
# =============================================================================
# intrinseca/primitiva — ตรรกะ, เปล่า, ไม่รู้
#
# GRAMMAR:
# typeExpr :← 'ตรรกะ' | 'เปล่า' | 'ไม่รู้'
#
# EXPECTED OUTPUT:
# ping, นัล est, จริง est, aliud est
#
# BACKEND:
# Cross-ref เปล่า/vacuum.fab for void returns; จํานวน/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