Variables & Types
sad
متغير name = "Sad Language" # string (نص)
متغير count = 42 # integer (رقم)
متغير ratio = 3.14 # float (عشري)
متغير active = صحيح # boolean (منطقي)
متغير nothing = لاشيء # null (عدم)
# Constants
ثابت MAX_SIZE = 1000
ثابت APP_NAME = "My Sad App"
# Arrays
متغير numbers = [10، 20، 30]
اطبع(numbers[0]) # 10
numbers.أضف(40)
اطبع(numbers.طول()) # 4
# Maps (Dictionaries)
متغير user = {"name": "Ali"، "age": 30}
اطبع(user["name"]) # Ali| Type | Keyword | Example |
|---|---|---|
| Integer | رقم | 42, -10 |
| Float | عشري | 3.14 |
| String | نص | "hello" |
| Boolean | منطقي | صحيح/خطأ |
| Null | عدم | لاشيء |
| Array | مصفوفة | [1, 2, 3] |
| Map | خريطة | {"key": "val"} |