रेंडरिंगhi

पहले

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

Creates an exclusive range with a Latin keyword.

Syntax: <expression> पहले <expression>

Category#

range

Examples#

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

Creates an exclusive range with a Latin keyword.

# =============================================================================
# पहले — Creates an exclusive range with a Latin keyword.
# =============================================================================
#
# What this teaches:
#   • Exclusive range iteration — `सीमा <initium> पहले <finis>` iterates from
#     initium up to (but not including) finis
#   • Range keyword pattern — `पहले` provides a natural-language alternative
#     to symbolic range syntax
#
# Common mistakes:
#   • confusing `पहले` (exclusive upper bound) with `तक` (inclusive) — `0 पहले 4` yields 0,1,2,3 while `0 तक 4` yields 0,1,2,3,4
#
# See also: तक, ‥
# =============================================================================

# पहले — exclusive upper bound for range iteration
#
# दोहराओ सीमा <initium> पहले <finis> <var> { … }
#
# GRAMMAR:
#   iterStmt :← 'दोहराओ' 'सीमा' expr 'पहले' expr binding '{' stmt* '}'
#
# EXPECTED OUTPUT:
#   none

main {
    # i = 0, 1, 2, 3 (stops before 4)
    for range 0 before 4 const i {
        print i
    }
}

Expected output:

0
1
2
3