Renderingen-US

Experimental through version 1. Version 0 was alpha. This is the first language release: the interface is relatively stable, not frozen. Nothing is promised stable until version 2.

∨

Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.

Bitwise or and est-negation operators.

Syntax: <expression> ∨ <expression> | <expression> is not <expression>

Category#

logic

Examples#

radix/corpus/reference/operator-group/bitwise-or/logica.fab (canonical · operator-group)#

Bitwise or and est-negation operators.

# =============================================================================
# ∨ — Bitwise or and est-negation operators.
# =============================================================================
#
# What this teaches:
#   • Bitwise or — `∨` combines bit flags; distinct from logical short-circuit `or` and `vel`.
#   • Negated est — `not is` (la `is not`) checks that a value's runtime type is not the given type, e.g. `x not is none`.
#
# Common mistakes:
#   • Confusing ∨ (bitwise or) with or (exclusive or) or vel (inclusive or).
#
# See also: ∧, ⊻, ¬, et, or, vel, is not, est
# =============================================================================

# operatores/logica — ∨ and is not
#
# GRAMMAR:
#   binaryExpr :← expr ('∨' | 'not' 'est') expr
#
# EXPECTED OUTPUT:
#   14, true, false
#
# BACKEND:
#   Cross-ref boolean short-circuit: et/et.fab, or/binarius.fab, vel/binarius.fab.
#   Negated est parses as `expr is not target`.

main {
    let _ vexilla ← 10
    let _ persona ← 12
    let _ velata ← vexilla ∨ persona
    # 14 (0b1110)
    print velata
    let string ∪ none praesens ← "salve"
    let string ∪ none absens ← null
    let bool habetValorem ← praesens not is none
    # true
    print habetValorem
    let bool caretValorem ← absens not is none
    # false
    print caretValorem
}

Expected output:

14
true
false