Loading AI tools
שפת תכנות מוויקיפדיה, האנציקלופדיה החופשית
Boo היא שפת תכנות מונחית עצמים, סטטית[1], וכללית (אנ') שהופיעה לראשונה בשנת 2003. היא משתמשת בתמיכתה של Common Language Infrastructure (או בקיצור: CLI), (אנ') ויישומי רשת בשביל יוניקוד תוך כדי שימוש בתחביר (Syntax) אשר קיבל השראה מפייתון. בשפה ניתן דגש מיוחד על "יכולת ההרחבה" (אנ')[2] של השפה ושל המהדר.
יש להשלים ערך זה: בערך זה חסר תוכן מהותי. | |
Boo הייתה אחת משלושת שפות התכנות הסקריפטיות בשביל מנוע המשחקים Unity עד להסרתה משם בשנת 2014 מפני שקהל המשתמשים שלה היה קטן. אף על פי כן, היה ניתן לכתוב ב-Boo ב-Unity עד להסרת המהדר של Boo ממנה בשנת 2017.
Boo היא תוכנה חינמית, שיצאה תחת רישיון BSD 3-Clause לשלדי התוכנה של מיקרוסופט, .NET ו-Mono.
Inline comments (הערות של שורה אחת) | // |
---|---|
Non-nestable comments (הערות של כמה שורות) | /* ... */ |
Variable assignment (השמה למשתנה קיים) | variable = value |
Variable declaration (יצירת משתנה) | variable as type |
Variable declaration with assignment (יצירת משתנה והשמה) | variable as type = value |
Block (בלוק קוד) | indentation (הזחה) |
Comparison (אופרטורים של השוואה) | < > <= >= |
Function definition (הגדרה פונקציה) | def f(p1 as type1, p2 as type2, ...) as returntype: |
Function call (קריאה לפונקציה) | (...,f(a,b |
Function call with no parameters (קריאה לפונקציה ללא פרמטרים) | ()f |
Sequence | end of line (סיום השורה) |
If - then | ... :if condition |
If - then - else | ... :if condition: ... else |
For each value in a numeric range, 1 increment | .... : (1,11)for i in range |
הדפסת "שלום, עולם" באנגלית:
print "Hello World!"
קוד המדפיס את סדרת פיבונאצ'י עד לאינדקס[3] מסוים בסדרה (אותו המתכנת בוחר):
def fib():
a, b = 0L, 1L # The 'L's make the numbers double word length (typically 64 bits)
while true:
yield b
a, b = b, a + b
# Print the first 5 numbers in the series:
for index as int, element in zip(range(5), fib()):
print("${index+1}: ${element}")
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.