Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
Mohammed Ezzedine edited this page Nov 21, 2020 · 2 revisions
  • Declaring a variable:
متغير س = 1؛
  • Declaring a variable with no value (null):
متغير ج = عدم؛
  • Assigning a value to declared variable:
ب = 1؛
  • Declaring a constant:
ثابت باي = 3.14؛
  • Print value:
اكتب("مرحبا بالعالم!")؛
  • Return value:
ارجع "مرحبا بالعالم"؛
  • Single line comment:
# هذا تعليق
  • If statement:
اذا (شرط) {

}
  • If-else statement:
اذا (شرط) {

}
والا {

}
  • While loop:
طالما (شرط) {

}
  • For loop:
كرر (متغير ع = 0؛ ع < 10؛ ع++) {

}
  • Function:
دالة اجمع(ا، ب) {
    ارجع ا + ب؛
}
  • Class:
صنف انسان {
    دالة انسان () {

    }
}
  • Instantiating a class:
متغير محمد = انشئ انسان()؛
  • boolean values: صحيح or خطأ

  • null: عدم

Clone this wiki locally