रेंडरिंगhi

नहीं

Translation status: हिन्दी reader-locale proof. Term names and code fences follow the hi pack; supporting prose may still be English.

Negates a boolean expression.

Aliases: !

Syntax: नहीं <expression>

Category#

logic

Examples#

radix/corpus/non/non.fab (canonical · keyword)#

Negates a boolean expression.

test "non negates falsum" {
    const bool flag ← false
    const bool negated ← not flag
    assert negated
}

test "non negates verum" {
    const bool flag ← true
    const bool negated ← not flag
    assert negated ≡ false
}

test "non applied twice returns the original" {
    const bool flag ← false
    const bool negated ← not flag
    const bool bis ← not negated
    assert bis ≡ false
}
# =============================================================================
# नहीं — Negates a boolean expression.
# =============================================================================
#
# What this teaches:
#   • the `नहीं` keyword — unary boolean negation (equivalent to `!`)
#
# Common mistakes:
#   • Confusing नहीं (logical negation) with ≠ (inequality comparison) — नहीं negates a boolean, ≠ compares two values.
#
# See also: सत्य, असत्य
# =============================================================================

# नहीं — logical not
#
# GRAMMAR:
#   unaryExpr :← 'नहीं' expr
#
# EXPECTED OUTPUT:
#   Scalar stdout smoke (see body).
#

main {
    const bool flag ← false
    const bool negated ← not flag
    print negated
}

Expected output:

verum