सभी
Translation status: हिन्दी reader-locale proof. Term names and code fences follow the hi pack; supporting prose may still be English.
Marks a test hook as applying to every case.
Syntax: सभी
Category#
testing
Related#
Examples#
radix/corpus/omnia/omnia.fab (canonical · keyword)#
Marks a test hook as applying to every case.
# =============================================================================
# सभी — Marks a test hook as applying to every case.
# =============================================================================
#
# What this teaches:
# • Exhaustive matching — `मिलाओ सभी` requires every variant of a `विभेद` to have a `स्थिति` branch.
# • Safety guarantee — The compiler rejects incomplete matches, eliminating forgotten variant bugs.
#
# Common mistakes:
# • Using अन्यतम with मिलाओ सभी — सभी forbids catchall arms; list every variant explicitly.
#
# See also: पूर्वतैयार, पश्चतैयार
# =============================================================================
# सभी — exhaustive मिलाओ (must cover every variant)
#
# मिलाओ सभी <विभेद> { स्थिति <Variant> { … } … }
#
# GRAMMAR:
# matchStmt :← 'मिलाओ' 'सभी' expr '{' casuClause* '}'
#
# EXPECTED OUTPUT:
# none — stdout not pinned for this exemplum.
union Condicio {
Activa,
Quietus
}
fn narra(Condicio condicio) → string {
# every variant must have a स्थिति
match all condicio {
case Activa {
return "activa"
}
case Quietus {
return "quietus"
}
}
}
main {
const Condicio condicio ← variant Activa
print narra(condicio)
}Expected output:
activa