1. Glossaryفەرهەنگی زاراوەکان
Off-by-one error
هەڵەی یەکێک زیاتر یان کەمتر
Proposed Kurdish term — under reviewزاراوەی پێشنیارکراو — لە ژێر پێداچوونەوەدایە

Definitionپێناسە

A where a runs one time too many or one time too few, often because <= was used instead of <. With arrays it usually reads one past the end.

کە تێیدا جارێک زیاتر یان جارێک کەمتر لە پێویست دەسوڕێتەوە، زۆرجار لەبەر ئەوەی لە جیاتی < نیشانەی <= بەکارهاتووە. لەگەڵ زۆرجار دوای کۆتایی دەخوێنێتەوە.

Exampleنموونە

An array of 3 elements has the indexes 0, 1 and 2. Using <= also asks for index 3, which does not exist.

کە 3 تێدایە، 0، 1 و 2 دەبن. بەکارهێنانی <= داوای 3یش دەکات، کە بوونی نییە.

$a = [10, 20, 30];
for ($i = 0; $i <= count($a); $i++) { // bug: should be <
    echo $a[$i];  // Warning: Undefined array key 3
}

Other Kurdish renderings in useوەرگێڕانە کوردییەکانی تر

ئۆف بای وەن، هەڵەیەکی یەکێک زیاتر یان کەمتر، هەڵەکانی یەکێک زیاتر یان کەمتر

Note on the Kurdish termتێبینی دەربارەی زاراوە کوردییەکە

No established Kurdish term; the proposal describes the idea («one more or one less»). Many Kurdish programmers simply say the English name.

Related termsزاراوە پەیوەندیدارەکان

Learn more inزیاتر فێربە لە