Kết xuấtvi

và

Translation status: Tiếng Việt reader-locale proof. Term names and code fences follow the vi pack; supporting prose may still be English.

Combines boolean expressions with logical and.

Aliases: and

Syntax: <expression> và <expression>

Category#

logic

Examples#

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

Combines boolean expressions with logical and.

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 bool paratus ← true
    const bool licet ← true
    const bool currit ← paratus and licet
    assert currit ≡ true
}
# =============================================================================
# et — Combines boolean expressions with logical and.
# =============================================================================
#
# What this teaches:
#   • Logical AND — `<logic> et <logic>` combines two boolean operands with short-circuit evaluation.
#   • Short-circuit behavior — if the left operand is sai, the right operand is not evaluated.
#
# Common mistakes:
#   • Confusing `et` with `hoặc` — `et` requires both operands to be logic (truthy); `hoặc` requires at least one operand to be truthy.
#
# See also: hoặc, không
# =============================================================================


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

main {
    # left operand: đúng
    const bool paratus ← true
    # right operand: đúng
    const bool licet ← true
    # đúng et đúng → đúng
    const bool currit ← paratus and licet
    print currit
}

Expected output:

verum