การเรนเดอร์th-TH

≡

Translation status: ภาษาไทย reader-locale proof. Term names and code fences follow the th-TH pack; supporting prose may still be English.

Equality and ordering comparisons returning ตรรกะ.

Syntax: <expression> ≡ <expression> | <expression> ≠ <expression> | <expression> ≤ <expression> | <expression> ≥ <expression>

Category#

comparison

Examples#

radix/corpus/operatores/comparatio.fab (canonical · operator-group)#

Equality and ordering comparisons returning ตรรกะ.

test "equal and not-equal comparisons" {
    assert 10 ≡ 10
    assert 10 ≠ 5
}

test "ordering and chained interval" {
    assert 5 ≤ 10
    assert 10 ≥ 5
    assert 0 ≺ 5 and 5 ≺ 10
}
# =============================================================================
# ≡ — Equality and ordering comparisons returning ตรรกะ.
# =============================================================================
#
# What this teaches:
#   • Comparison operators — `≡` (equal), `≠` (not equal), `≤` (less-or-equal), `≥` (greater-or-equal).
#   • Chaining — Comparisons can be chained with `et` for interval tests like `0 < x et x < 10`.
#
# Common mistakes:
#   • Using == instead of ≡ for equality, or != instead of ≠ for inequality — Faber uses Unicode operators.
#
# See also: ≠, ≤, ≥, est, ยืนยัน
# =============================================================================

# operatores/comparatio — ≡ ≠ ≤ ≥
#
# GRAMMAR:
#   cmpExpr :← expr ('≡' | '≠' | '≤' | '≥' | '<' | '>') expr
#
# EXPECTED OUTPUT:
#   จริง, จริง, จริง, จริง, จริง
#
# BACKEND:
#   Scalar ตรรกะ stdout; chain with et for interval tests.

main {
    const bool aequalis ← 10 ≡ 10
    print aequalis
    const bool diversus ← 10 ≠ 5
    print diversus
    const bool nonMaior ← 5 ≤ 10
    print nonMaior
    const bool nonMinor ← 10 ≥ 5
    print nonMinor
    const bool อันตรภาค ← 0 ≺ 5 and 5 ≺ 10
    print อันตรภาค
}

Expected output:

verum
verum
verum
verum
verum