∨
Translation status: Tiếng Việt reader-locale proof. Term names and code fences follow the vi pack; supporting prose may still be English.
Bitwise or and est-negation operators.
Syntax: <expression> ∨ <expression> | <expression> is not <expression>
Category#
logic
Related#
- ∧
- ⊻
- ¬
- và
- hoặc
- hoặc_nếu_rỗng
- non est
- là
Examples#
radix/corpus/operatores/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 `hoặc` and `vel`.
# • Negated est — `không est` checks that a value is not null or not equal to a target.
#
# Common mistakes:
# • Confusing ∨ (bitwise or) with hoặc (exclusive or) or vel (inclusive or).
#
# See also: ∧, ⊻, ¬, et, hoặc, vel, không est, est
# =============================================================================
# operatores/logica — ∨ and không est
#
# GRAMMAR:
# binaryExpr :← expr ('∨' | 'không' 'est') expr
#
# EXPECTED OUTPUT:
# 14, đúng, sai
#
# BACKEND:
# Cross-ref boolean short-circuit: et/et.fab, hoặc/binarius.fab, vel/binarius.fab.
# Negated est parses as `expr không est target`.
main {
const _ vexilla ← 0b1010
const _ persona ← 0b1100
const _ velata ← vexilla ∨ persona
# 14 (0b1110)
print velata
const string ∪ none praesens ← "salve"
const string ∪ none absens ← null
const bool habetValorem ← praesens not is none
# đúng
print habetValorem
const bool caretValorem ← absens not is none
# sai
print caretValorem
}Expected output:
14
verum
falsum