نطاق
Translation status: العربية reader-locale proof. Term names and code fences follow the ar pack; supporting prose may still be English.
Selects numeric range iteration in an كرر loop.
Syntax: كرر نطاق <range> <binding>
Category#
iteration
Related#
Examples#
radix/corpus/ab/ab.fab (canonical · keyword)#
Selects numeric range iteration in an كرر loop.
# =============================================================================
# نطاق — Selects numeric range iteration in an كرر loop.
# =============================================================================
#
# What this teaches:
# • `كرر نطاق` bounded range iteration — iterates over a numeric range with
# an optional step
# • Step syntax — the `per <step>` clause controls stride within the range
#
# Common mistakes:
# • using the retired `نطاق`/`ubi` collection pipeline DSL; use ordinary collection methods and closures instead
#
# See also: كرر, من, عن, per, نطاق pipeline
# =============================================================================
# نطاق — bounded iteration step
#
# GRAMMAR:
# iteraStmt :← 'كرر' 'نطاق' expr '‥' expr step? 'ثابت' ident block
#
# EXPECTED OUTPUT:
# Scalar stdout smoke (see body).
#
main {
for range 0‥10 step 2 const i {
print i
}
}Expected output:
0
2
4
6
8