السلام عليكم
وانا اليوم أمرّ كعادتي على الجديد في لغات البرمجة وجدت هذه الـظريفة ooc
وأقصد بالظرافة هنا انتهاجها لخط جديد في تركيب جملها البرمجية
لاحظ المثال :
import os/[Terminal]
Notifier: class {
quiet: Bool
init: func
notify: func (online: Bool, url: String) {
if (online) {
if (quiet) return
Terminal setFgColor(Color green)
"[ OK ] %s is online." printfln(url)
Terminal reset()
} else {
Terminal setFgColor(Color red)
"[ERROR] %s is not reachable! You may panic now." printfln(url)
Terminal reset()
}
}
}
التعليقات