Represents the null value and can prefix a null check.
Syntax: nihil [<expression>]
Category
literal
Related
Examples
examples/corpus/literalia/nihil.fab (canonical · existing-home)
Null literal and nullable union bindings.
# literalia/nihil — nihil literal and T ∪ nihil
#
# GRAMMAR:
# literal :← 'nihil'
# unionType :← type '∪' 'nihil'
#
# EXPECTED OUTPUT:
# nihil, verum, 42
#
# BACKEND:
# Cross-ref nihil/nihil.fab and nonnihil/nonnihil.fab.
functio maybe() → numerus ∪ nihil {
redde 42
}
incipit {
fixum numerus ∪ nihil absent ← nihil
nota absent
fixum _ nihilne ← absent est nihil
nota nihilne
nota maybe() non est nihil
}Expected output:
nihil
verum
verum
examples/corpus/nihil/nihil.fab (canonical · keyword)
Represents the null value and can prefix a null check.
# nihil — null literal
#
# GRAMMAR:
# literal :← 'nihil'
#
# EXPECTED OUTPUT:
# Scalar stdout smoke (see body).
#
incipit {
fixum _ nothing ← nihil
nota nothing
}Expected output:
nihil