1. Glossaryفەرهەنگی زاراوەکان
Main function
کرداری main
Proposed Kurdish term — under reviewزاراوەی پێشنیارکراو — لە ژێر پێداچوونەوەدایە

Definitionپێناسە

The function where a program starts. Java always runs public static void main(String[] args) first. In Python it is only a habit: write def main(): and call it under if __name__ == "__main__":, so the file can also be imported as a .

ئەو کە لێیەوە دەست پێ دەکات. Java هەمیشە سەرەتا public static void main(String[] args) جێبەجێ دەکات؛ لە Pythonـدا تەنها نەریتێکە: def main(): دەنووسیت و لە ژێر if __name__ == "__main__":ـدا بانگی دەکەیت، بۆ ئەوەی فایلەکە وەک هاوردە بکرێت.

Exampleنموونە

Run directly, the file calls main(); imported by another file, it does not.

ئەگەر ڕاستەوخۆ جێبەجێ بکرێت، فایلەکە main() بانگ دەکات؛ ئەگەر فایلێکی تر هاوردەی بکات، بانگی ناکات.

def main():
    print("Start")

if __name__ == "__main__":
    main()

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

کرداری سەرەکی، میتۆدی main، کردارەکەی main، کردارێکی main

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

Written like the registry's if-statement (ڕستەی if): کردار (function) + the code name main. The descriptive کرداری سەرەکی is kept only as an alternative, because «کردارە سەرەکییەکە» already means 'the main verb' in the Technical English grammar lessons (کردار is also the Kurdish word for a verb). Proposed.

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

Videosڤیدیۆکان

Python if __name__ == '__main__': Visually ExplainedVisually Explained · Englishئینگلیزی · 643K viewsبینین · 28K likesلایک · Partبەشی 3:05–6:06 (ofلە 6:06)

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