Short-circuit evaluation
هەڵسەنگاندنی کورتبڕ
Proposed Kurdish term — under reviewزاراوەی پێشنیارکراو — لە ژێر پێداچوونەوەدایە Definitionپێناسە
Stopping the work on and / or (&& / ||) as soon as the answer is known: if the left side of and is false, or the left side of or is true, the right side is not checked. Python, PHP, Java and C# all do this.
وەستاندنی هەڵسەنگاندنی and / or (&& / ||) هەر کە وەڵامەکە زانرا: ئەگەر لای چەپی and هەڵە بێت، یان لای چەپی or ڕاست بێت، لای ڕاست ناپشکنرێت. Python، PHP، Java و C# هەموویان ئەمە دەکەن.
Exampleنموونە
isset($age) && $age > 18 never reads $age when it does not exist.
isset($age) && $age > 18 هەرگیز $age ناخوێنێتەوە کاتێک بوونی نییە.
if (isset($age) && $age > 18) {
echo "Adult";
}Other Kurdish renderings in useوەرگێڕانە کوردییەکانی تر
هەڵسەنگاندنە کورتبڕەکە، هەڵسەنگاندنێکی کورتبڕ
Note on the Kurdish termتێبینی دەربارەی زاراوە کوردییەکە
No Kurdish term in the course materials; کورتبڕ ("cutting short") is a descriptive proposal.
Related termsزاراوە پەیوەندیدارەکان
Videosڤیدیۆکان
Learn more inزیاتر فێربە لە
- Conditional Statements: if, else, elseif and switchڕستە مەرجییەکان: if و else و elseif و switch
- Logical Operators and Nested ifکارپێکەرە لۆجیکییەکان و ڕستەی ifـی ناوەکی
- Making Decisions: Relational Operators and if / elseif / elseبڕیاردان: کارپێکەرەکانی بەراوردکردن و if / elseif / else
- Operatorsکارپێکەرەکان
- while Loops, break and continueخولەکانی while، break و continue