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

et

Translation status: ภาษาไทย reader-locale proof. Code fences render through the th-TH pipeline; prose is canonical Latin.

Combines boolean expressions with logical and.

Aliases: and

Syntax: <expression> et <expression>

Category#

logic

Examples#

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

Combines boolean expressions with logical and.

# =============================================================================
# et — Combines boolean expressions with logical and.
# =============================================================================
#
# What this teaches:
#   • Logical AND — `<bivalens> et <bivalens>` combines two boolean operands with short-circuit evaluation.
#   • Short-circuit behavior — if the left operand is falsum, the right operand is not evaluated.
#
# Common mistakes:
#   • Confusing `et` with `aut` — `et` requires both operands to be bivalens (truthy); `aut` requires at least one operand to be truthy.
#
# See also: aut, non
# =============================================================================


# et — logical AND on bivalent operands (short-circuit)
#
# <bivalens> et <bivalens>
#
# GRAMMAR:
#   binaryExpr :← expr 'et' expr
#
# EXPECTED OUTPUT:
#   none

main {
    # left operand: verum
    const _ paratus  true
    # right operand: verum
    const _ licet  true
    # verum et verum → verum
    const _ currit  paratus and licet

    print currit
}

test "and requires both operands" {
    assert (true and true)  true
    assert (false and true)  false
    assert (true and false)  false
    assert (false and false)  false
}

test "and mirrors the incipit smoke" {
    const _ paratus  true
    const _ licet  true
    const _ currit  paratus and licet
    assert currit  true
}

Expected output:

verum